@sveltia/cms 0.122.2 → 0.123.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -14
- package/dist/sveltia-cms.js +76 -77
- package/dist/sveltia-cms.js.map +1 -1
- package/dist/sveltia-cms.mjs +55 -56
- package/dist/sveltia-cms.mjs.map +1 -1
- package/package.json +1 -1
- package/schema/sveltia-cms.json +1 -1
- package/types/public.d.ts +2 -1
package/dist/sveltia-cms.mjs
CHANGED
|
@@ -136,7 +136,7 @@ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.pus
|
|
|
136
136
|
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
137
137
|
`,n)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const n=bp(e),r=Mc(n);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const n=bp(e),r=Mc(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,n){return this.type!=="comment"||this.indent<=n?!1:e.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function Qj(t){const e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new Xj||null,prettyErrors:e}}function eU(t,e={}){const{lineCounter:n,prettyErrors:r}=Qj(e),i=new Zj(n?.addNewLine),o=new Vj(e);let a=null;for(const s of o.compose(i.parse(t),!0,t.length))if(!a)a=s;else if(a.options.logLevel!=="silent"){a.errors.push(new rf(s.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(a.errors.forEach(uS(t,n)),a.warnings.forEach(uS(t,n))),a}function tU(t,e,n){let r;typeof e=="function"?r=e:n===void 0&&e&&typeof e=="object"&&(n=e);const i=eU(t,n);if(!i)return null;if(i.warnings.forEach(o=>Q2(i.options.logLevel,o)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},n))}function kx(t,e,n){let r=null;if(typeof e=="function"||Array.isArray(e)?r=e:n===void 0&&e&&(n=e),typeof n=="string"&&(n=n.length),typeof n=="number"){const i=Math.round(n);n=i<1?void 0:i>8?{indent:8}:{indent:i}}if(t===void 0){const{keepUndefined:i}=n??e??{};if(!i)return}return $h(t)&&!r?t.toString(n):new Oh(t,r,n).toString(n)}const ad=it(!1),fa=it(),Sx=it([]),to=it([]),Ex=it([]),$P=t=>oe(Sx).filter(({collectionName:e,filePathMap:n})=>n?Object.values(n).includes(t):ki(e)?._file?.fullPathRegEx?.test(t)).sort((e,n)=>(n.folderPath??"").localeCompare(e.folderPath??""));var Yp={exports:{}},nU=Yp.exports,mS;function rU(){return mS||(mS=1,(function(t,e){(function(n,r){t.exports=r()})(nU,(function(){var n=1e3,r=6e4,i=36e5,o="millisecond",a="second",s="minute",l="hour",u="day",d="week",f="month",h="quarter",p="year",g="date",m="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(L){var D=["th","st","nd","rd"],B=L%100;return"["+L+(D[(B-20)%10]||D[B]||D[0])+"]"}},w=function(L,D,B){var K=String(L);return!K||K.length>=D?L:""+Array(D+1-K.length).join(B)+L},x={s:w,z:function(L){var D=-L.utcOffset(),B=Math.abs(D),K=Math.floor(B/60),G=B%60;return(D<=0?"+":"-")+w(K,2,"0")+":"+w(G,2,"0")},m:function L(D,B){if(D.date()<B.date())return-L(B,D);var K=12*(B.year()-D.year())+(B.month()-D.month()),G=D.clone().add(K,f),W=B-G<0,Y=D.clone().add(K+(W?-1:1),f);return+(-(K+(B-G)/(W?G-Y:Y-G))||0)},a:function(L){return L<0?Math.ceil(L)||0:Math.floor(L)},p:function(L){return{M:f,y:p,w:d,d:u,D:g,h:l,m:s,s:a,ms:o,Q:h}[L]||String(L||"").toLowerCase().replace(/s$/,"")},u:function(L){return L===void 0}},E="en",$={};$[E]=y;var A="$isDayjsObject",k=function(L){return L instanceof O||!(!L||!L[A])},T=function L(D,B,K){var G;if(!D)return E;if(typeof D=="string"){var W=D.toLowerCase();$[W]&&(G=W),B&&($[W]=B,G=W);var Y=D.split("-");if(!G&&Y.length>1)return L(Y[0])}else{var R=D.name;$[R]=D,G=R}return!K&&G&&(E=G),G||!K&&E},C=function(L,D){if(k(L))return L.clone();var B=typeof D=="object"?D:{};return B.date=L,B.args=arguments,new O(B)},P=x;P.l=T,P.i=k,P.w=function(L,D){return C(L,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var O=(function(){function L(B){this.$L=T(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[A]=!0}var D=L.prototype;return D.parse=function(B){this.$d=(function(K){var G=K.date,W=K.utc;if(G===null)return new Date(NaN);if(P.u(G))return new Date;if(G instanceof Date)return new Date(G);if(typeof G=="string"&&!/Z$/i.test(G)){var Y=G.match(v);if(Y){var R=Y[2]-1||0,q=(Y[7]||"0").substring(0,3);return W?new Date(Date.UTC(Y[1],R,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,q)):new Date(Y[1],R,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,q)}}return new Date(G)})(B),this.init()},D.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds()},D.$utils=function(){return P},D.isValid=function(){return this.$d.toString()!==m},D.isSame=function(B,K){var G=C(B);return this.startOf(K)<=G&&G<=this.endOf(K)},D.isAfter=function(B,K){return C(B)<this.startOf(K)},D.isBefore=function(B,K){return this.endOf(K)<C(B)},D.$g=function(B,K,G){return P.u(B)?this[K]:this.set(G,B)},D.unix=function(){return Math.floor(this.valueOf()/1e3)},D.valueOf=function(){return this.$d.getTime()},D.startOf=function(B,K){var G=this,W=!!P.u(K)||K,Y=P.p(B),R=function(he,ue){var ge=P.w(G.$u?Date.UTC(G.$y,ue,he):new Date(G.$y,ue,he),G);return W?ge:ge.endOf(u)},q=function(he,ue){return P.w(G.toDate()[he].apply(G.toDate("s"),(W?[0,0,0,0]:[23,59,59,999]).slice(ue)),G)},J=this.$W,Q=this.$M,ee=this.$D,re="set"+(this.$u?"UTC":"");switch(Y){case p:return W?R(1,0):R(31,11);case f:return W?R(1,Q):R(0,Q+1);case d:var te=this.$locale().weekStart||0,de=(J<te?J+7:J)-te;return R(W?ee-de:ee+(6-de),Q);case u:case g:return q(re+"Hours",0);case l:return q(re+"Minutes",1);case s:return q(re+"Seconds",2);case a:return q(re+"Milliseconds",3);default:return this.clone()}},D.endOf=function(B){return this.startOf(B,!1)},D.$set=function(B,K){var G,W=P.p(B),Y="set"+(this.$u?"UTC":""),R=(G={},G[u]=Y+"Date",G[g]=Y+"Date",G[f]=Y+"Month",G[p]=Y+"FullYear",G[l]=Y+"Hours",G[s]=Y+"Minutes",G[a]=Y+"Seconds",G[o]=Y+"Milliseconds",G)[W],q=W===u?this.$D+(K-this.$W):K;if(W===f||W===p){var J=this.clone().set(g,1);J.$d[R](q),J.init(),this.$d=J.set(g,Math.min(this.$D,J.daysInMonth())).$d}else R&&this.$d[R](q);return this.init(),this},D.set=function(B,K){return this.clone().$set(B,K)},D.get=function(B){return this[P.p(B)]()},D.add=function(B,K){var G,W=this;B=Number(B);var Y=P.p(K),R=function(Q){var ee=C(W);return P.w(ee.date(ee.date()+Math.round(Q*B)),W)};if(Y===f)return this.set(f,this.$M+B);if(Y===p)return this.set(p,this.$y+B);if(Y===u)return R(1);if(Y===d)return R(7);var q=(G={},G[s]=r,G[l]=i,G[a]=n,G)[Y]||1,J=this.$d.getTime()+B*q;return P.w(J,this)},D.subtract=function(B,K){return this.add(-1*B,K)},D.format=function(B){var K=this,G=this.$locale();if(!this.isValid())return G.invalidDate||m;var W=B||"YYYY-MM-DDTHH:mm:ssZ",Y=P.z(this),R=this.$H,q=this.$m,J=this.$M,Q=G.weekdays,ee=G.months,re=G.meridiem,te=function(ue,ge,ye,me){return ue&&(ue[ge]||ue(K,W))||ye[ge].slice(0,me)},de=function(ue){return P.s(R%12||12,ue,"0")},he=re||function(ue,ge,ye){var me=ue<12?"AM":"PM";return ye?me.toLowerCase():me};return W.replace(b,(function(ue,ge){return ge||(function(ye){switch(ye){case"YY":return String(K.$y).slice(-2);case"YYYY":return P.s(K.$y,4,"0");case"M":return J+1;case"MM":return P.s(J+1,2,"0");case"MMM":return te(G.monthsShort,J,ee,3);case"MMMM":return te(ee,J);case"D":return K.$D;case"DD":return P.s(K.$D,2,"0");case"d":return String(K.$W);case"dd":return te(G.weekdaysMin,K.$W,Q,2);case"ddd":return te(G.weekdaysShort,K.$W,Q,3);case"dddd":return Q[K.$W];case"H":return String(R);case"HH":return P.s(R,2,"0");case"h":return de(1);case"hh":return de(2);case"a":return he(R,q,!0);case"A":return he(R,q,!1);case"m":return String(q);case"mm":return P.s(q,2,"0");case"s":return String(K.$s);case"ss":return P.s(K.$s,2,"0");case"SSS":return P.s(K.$ms,3,"0");case"Z":return Y}return null})(ue)||Y.replace(":","")}))},D.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},D.diff=function(B,K,G){var W,Y=this,R=P.p(K),q=C(B),J=(q.utcOffset()-this.utcOffset())*r,Q=this-q,ee=function(){return P.m(Y,q)};switch(R){case p:W=ee()/12;break;case f:W=ee();break;case h:W=ee()/3;break;case d:W=(Q-J)/6048e5;break;case u:W=(Q-J)/864e5;break;case l:W=Q/i;break;case s:W=Q/r;break;case a:W=Q/n;break;default:W=Q}return G?W:P.a(W)},D.daysInMonth=function(){return this.endOf(f).$D},D.$locale=function(){return $[this.$L]},D.locale=function(B,K){if(!B)return this.$L;var G=this.clone(),W=T(B,K,!0);return W&&(G.$L=W),G},D.clone=function(){return P.w(this.$d,this)},D.toDate=function(){return new Date(this.valueOf())},D.toJSON=function(){return this.isValid()?this.toISOString():null},D.toISOString=function(){return this.$d.toISOString()},D.toString=function(){return this.$d.toUTCString()},L})(),I=O.prototype;return C.prototype=I,[["$ms",o],["$s",a],["$m",s],["$H",l],["$W",u],["$M",f],["$y",p],["$D",g]].forEach((function(L){I[L[1]]=function(D){return this.$g(D,L[0],L[1])}})),C.extend=function(L,D){return L.$i||(L(D,O,C),L.$i=!0),C},C.locale=T,C.isDayjs=k,C.unix=function(L){return C(1e3*L)},C.en=$[E],C.Ls=$,C.p={},C}))})(Yp)),Yp.exports}var iU=rU();const wr=ts(iU);var Jp={exports:{}},oU=Jp.exports,vS;function aU(){return vS||(vS=1,(function(t,e){(function(n,r){t.exports=r()})(oU,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,o=/\d\d/,a=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,l={},u=function(v){return(v=+v)+(v>68?1900:2e3)},d=function(v){return function(b){this[v]=+b}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=(function(b){if(!b||b==="Z")return 0;var y=b.match(/([+-]|\d\d)/g),w=60*y[1]+(+y[2]||0);return w===0?0:y[0]==="+"?-w:w})(v)}],h=function(v){var b=l[v];return b&&(b.indexOf?b:b.s.concat(b.f))},p=function(v,b){var y,w=l.meridiem;if(w){for(var x=1;x<=24;x+=1)if(v.indexOf(w(x,0,b))>-1){y=x>12;break}}else y=v===(b?"pm":"PM");return y},g={A:[s,function(v){this.afternoon=p(v,!1)}],a:[s,function(v){this.afternoon=p(v,!0)}],Q:[i,function(v){this.month=3*(v-1)+1}],S:[i,function(v){this.milliseconds=100*+v}],SS:[o,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[a,d("seconds")],ss:[a,d("seconds")],m:[a,d("minutes")],mm:[a,d("minutes")],H:[a,d("hours")],h:[a,d("hours")],HH:[a,d("hours")],hh:[a,d("hours")],D:[a,d("day")],DD:[o,d("day")],Do:[s,function(v){var b=l.ordinal,y=v.match(/\d+/);if(this.day=y[0],b)for(var w=1;w<=31;w+=1)b(w).replace(/\[|\]/g,"")===v&&(this.day=w)}],w:[a,d("week")],ww:[o,d("week")],M:[a,d("month")],MM:[o,d("month")],MMM:[s,function(v){var b=h("months"),y=(h("monthsShort")||b.map((function(w){return w.slice(0,3)}))).indexOf(v)+1;if(y<1)throw new Error;this.month=y%12||y}],MMMM:[s,function(v){var b=h("months").indexOf(v)+1;if(b<1)throw new Error;this.month=b%12||b}],Y:[/[+-]?\d+/,d("year")],YY:[o,function(v){this.year=u(v)}],YYYY:[/\d{4}/,d("year")],Z:f,ZZ:f};function m(v){var b,y;b=v,y=l&&l.formats;for(var w=(v=b.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(C,P,O){var I=O&&O.toUpperCase();return P||y[O]||n[O]||y[I].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(L,D,B){return D||B.slice(1)}))}))).match(r),x=w.length,E=0;E<x;E+=1){var $=w[E],A=g[$],k=A&&A[0],T=A&&A[1];w[E]=T?{regex:k,parser:T}:$.replace(/^\[|\]$/g,"")}return function(C){for(var P={},O=0,I=0;O<x;O+=1){var L=w[O];if(typeof L=="string")I+=L.length;else{var D=L.regex,B=L.parser,K=C.slice(I),G=D.exec(K)[0];B.call(P,G),C=C.replace(G,"")}}return(function(W){var Y=W.afternoon;if(Y!==void 0){var R=W.hours;Y?R<12&&(W.hours+=12):R===12&&(W.hours=0),delete W.afternoon}})(P),P}}return function(v,b,y){y.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(u=v.parseTwoDigitYear);var w=b.prototype,x=w.parse;w.parse=function(E){var $=E.date,A=E.utc,k=E.args;this.$u=A;var T=k[1];if(typeof T=="string"){var C=k[2]===!0,P=k[3]===!0,O=C||P,I=k[2];P&&(I=k[2]),l=this.$locale(),!C&&I&&(l=y.Ls[I]),this.$d=(function(K,G,W,Y){try{if(["x","X"].indexOf(G)>-1)return new Date((G==="X"?1e3:1)*K);var R=m(G)(K),q=R.year,J=R.month,Q=R.day,ee=R.hours,re=R.minutes,te=R.seconds,de=R.milliseconds,he=R.zone,ue=R.week,ge=new Date,ye=Q||(q||J?1:ge.getDate()),me=q||ge.getFullYear(),Ae=0;q&&!J||(Ae=J>0?J-1:ge.getMonth());var Ce,_e=ee||0,fe=re||0,be=te||0,Oe=de||0;return he?new Date(Date.UTC(me,Ae,ye,_e,fe,be,Oe+60*he.offset*1e3)):W?new Date(Date.UTC(me,Ae,ye,_e,fe,be,Oe)):(Ce=new Date(me,Ae,ye,_e,fe,be,Oe),ue&&(Ce=Y(Ce).week(ue).toDate()),Ce)}catch{return new Date("")}})($,T,A,y),this.init(),I&&I!==!0&&(this.$L=this.locale(I).$L),O&&$!=this.format(T)&&(this.$d=new Date("")),l={}}else if(T instanceof Array)for(var L=T.length,D=1;D<=L;D+=1){k[1]=T[D-1];var B=y.apply(this,k);if(B.isValid()){this.$d=B.$d,this.$L=B.$L,this.init();break}D===L&&(this.$d=new Date(""))}else x.call(this,E)}}}))})(Jp)),Jp.exports}var sU=aU();const Tx=ts(sU);var Xp={exports:{}},lU=Xp.exports,_S;function cU(){return _S||(_S=1,(function(t,e){(function(n,r){t.exports=r()})(lU,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(r,i,o){var a=i.prototype,s=a.format;o.en.formats=n,a.format=function(l){l===void 0&&(l="YYYY-MM-DDTHH:mm:ssZ");var u=this.$locale().formats,d=(function(f,h){return f.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(p,g,m){var v=m&&m.toUpperCase();return g||h[m]||n[m]||h[v].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(b,y,w){return y||w.slice(1)}))}))})(l,u===void 0?{}:u);return s.call(this,d)}}}))})(Xp)),Xp.exports}var uU=cU();const $x=ts(uU);var Zp={exports:{}},dU=Zp.exports,bS;function fU(){return bS||(bS=1,(function(t,e){(function(n,r){t.exports=r()})(dU,(function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g;return function(o,a,s){var l=a.prototype;s.utc=function(m){var v={date:m,utc:!0,args:arguments};return new a(v)},l.utc=function(m){var v=s(this.toDate(),{locale:this.$L,utc:!0});return m?v.add(this.utcOffset(),n):v},l.local=function(){return s(this.toDate(),{locale:this.$L,utc:!1})};var u=l.parse;l.parse=function(m){m.utc&&(this.$u=!0),this.$utils().u(m.$offset)||(this.$offset=m.$offset),u.call(this,m)};var d=l.init;l.init=function(){if(this.$u){var m=this.$d;this.$y=m.getUTCFullYear(),this.$M=m.getUTCMonth(),this.$D=m.getUTCDate(),this.$W=m.getUTCDay(),this.$H=m.getUTCHours(),this.$m=m.getUTCMinutes(),this.$s=m.getUTCSeconds(),this.$ms=m.getUTCMilliseconds()}else d.call(this)};var f=l.utcOffset;l.utcOffset=function(m,v){var b=this.$utils().u;if(b(m))return this.$u?0:b(this.$offset)?f.call(this):this.$offset;if(typeof m=="string"&&(m=(function(E){E===void 0&&(E="");var $=E.match(r);if(!$)return null;var A=(""+$[0]).match(i)||["-",0,0],k=A[0],T=60*+A[1]+ +A[2];return T===0?0:k==="+"?T:-T})(m),m===null))return this;var y=Math.abs(m)<=16?60*m:m;if(y===0)return this.utc(v);var w=this.clone();if(v)return w.$offset=y,w.$u=!1,w;var x=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(w=this.local().add(y+x,n)).$offset=y,w.$x.$localOffset=x,w};var h=l.format;l.format=function(m){var v=m||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,v)},l.valueOf=function(){var m=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*m},l.isUTC=function(){return!!this.$u},l.toISOString=function(){return this.toDate().toISOString()},l.toString=function(){return this.toDate().toUTCString()};var p=l.toDate;l.toDate=function(m){return m==="s"&&this.$offset?s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():p.call(this)};var g=l.diff;l.diff=function(m,v,b){if(m&&this.$u===m.$u)return g.call(this,m,v,b);var y=this.local(),w=s(m).local();return g.call(y,w,v,b)}}}))})(Zp)),Zp.exports}var hU=fU();const Ax=ts(hU);class jo{#e;#n="";#t="";#i={};#l=[];constructor(e,n,{keyPath:r,autoIncrement:i,indexes:o=[]}={}){this.#e=void 0,this.#n=e,this.#t=n,this.#i={keyPath:r,autoIncrement:i},this.#l=o}async#a(e){return new Promise(n=>{const r=globalThis.indexedDB.open(this.#n,e);r.onupgradeneeded=()=>{const i=r.result,o=this.#t,a=i.objectStoreNames.contains(o)?i.transaction(o,"readwrite").objectStore(o):i.createObjectStore(o,this.#i);this.#l.forEach(({name:s,keyPath:l,options:u})=>{a.indexNames.contains(s)||a.createIndex(s,l,u)})},r.onsuccess=()=>{n(r.result)}})}async#s(){let e=!1,n=await this.#a();const{version:r,objectStoreNames:i}=n,o=this.#t;if(i.contains(o)){const a=n.transaction(o).objectStore(o);e=this.#l.some(({name:s})=>!a.indexNames.contains(s))}else e=!0;return e&&(n.close(),n=await this.#a(r+1)),n.onversionchange=()=>{n.close(),this.#e=void 0},n}async#r(e){this.#e??=await this.#s();const n=this.#e,r=this.#t,i=n.transaction(r,"readwrite"),o=e(i.objectStore(r));return o?new Promise(a=>{o.onsuccess=()=>{a(o.result)}}):new Promise(a=>{i.oncomplete=()=>{a(void 0)}})}async set(e,n){return this.#r(r=>r.put(n,e))}async put(e){return this.#r(n=>n.put(e))}async saveEntries(e){return this.#r(n=>{e.forEach(([r,i])=>{n.put(i,r)})})}async get(e){return this.#r(n=>n.get(e))}async keys(){return this.#r(e=>e.getAllKeys())}async values(){return this.#r(e=>e.getAll())}async entries(){const[e,n]=await Promise.all([this.keys(),this.values()]);return e.map((r,i)=>[r,n[i]])}async#o({callback:e=void 0,index:n=void 0,query:r=void 0,direction:i="next",multiple:o=!1}){return new Promise(a=>{this.#r(s=>{const l=(n?s.index(n):s).openCursor(r,i),u=[];l.onsuccess=()=>{const d=l.result;if(d){const{value:f}=d;typeof e!="function"||e(f)?o?(u.push(f),d.continue()):a(f):d.continue()}else a(o?u:void 0)}})})}async find(e,{index:n,query:r}={}){return this.#o({callback:e,index:n,query:r})}async findLast(e,{index:n,query:r}={}){return this.#o({callback:e,index:n,query:r,direction:"prev"})}async filter(e,{index:n,query:r}={}){return this.#o({callback:e,index:n,query:r,multiple:!0})}async delete(e){await this.#r(n=>n.delete(e))}async deleteEntries(e){await this.#r(n=>{e.forEach(r=>{n.delete(r)})})}async clear(){await this.#r(e=>e.clear())}}class Oi{static async set(e,n){globalThis.localStorage.setItem(e,JSON.stringify(n))}static async get(e){const n=globalThis.localStorage.getItem(e);return n?JSON.parse(n):null}static async delete(e){globalThis.localStorage.removeItem(e)}static async clear(){globalThis.localStorage.clear()}static async keys(){return Object.keys(globalThis.localStorage)}static async values(){return Object.values(globalThis.localStorage).map(e=>JSON.parse(e))}static async entries(){return Object.entries(globalThis.localStorage).map(([e,n])=>[e,JSON.parse(n)])}}const AP=t=>Array.isArray(t)&&t.every(e=>$t(e)),$u=t=>[...new Set(t)],CP={"application/prs.cww":["cww"],"application/prs.xsf+xml":["xsf"],"application/vnd.1000minds.decision-model+xml":["1km"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["*xfdf"],"application/vnd.age":["age"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.keynote":["key"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.numbers":["numbers"],"application/vnd.apple.pages":["pages"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.autodesk.fbx":["fbx"],"application/vnd.balsamiq.bmml+xml":["bmml"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.citationstyles.style+xml":["csl"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dbf":["dbf"],"application/vnd.dcmp+xml":["dcmp"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["*fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.slides":["ggs"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.drawing":["gdraw"],"application/vnd.google-apps.form":["gform"],"application/vnd.google-apps.jam":["gjam"],"application/vnd.google-apps.map":["gmap"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.script":["gscript"],"application/vnd.google-apps.site":["gsite"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.gov.sk.xmldatacontainer+xml":["xdcf"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mapbox-vector-tile":["mvt"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["*stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["*mpp","mpt"],"application/vnd.ms-visio.viewer":["vdx"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.nato.bindingdataobject+xml":["bdo"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.ac+xml":["*ac"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openblox.game+xml":["obgx"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openstreetmap.data+xml":["osm"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.procrate.brushset":["brushset"],"application/vnd.procreate.brush":["brush"],"application/vnd.procreate.dream":["drm"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.pwg-xhtml-print+xml":["xhtm"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.rar":["rar"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.software602.filler.form+xml":["fo"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.syncml.dmddf+xml":["ddf"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml","uo"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw","vsdx","vtx"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["*dmg"],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":["*bdoc"],"application/x-bittorrent":["torrent"],"application/x-blender":["blend"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-compressed":["*rar"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["*deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-ipynb+json":["ipynb"],"application/x-iso9660-image":["*iso"],"application/x-iwork-keynote-sffkey":["*key"],"application/x-iwork-numbers-sffnumbers":["*numbers"],"application/x-iwork-pages-sffpages":["*pages"],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-keepass2":["kdbx"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["*prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":["*exe"],"application/x-msdownload":["*exe","*dll","com","bat","*msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["*wmf","*wmz","*emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":["*prc","*pdb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["*rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["*sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["*obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["*xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zip-compressed":["*zip"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["*aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":["*m4a"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":["*ra"],"audio/x-wav":["*wav"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif","btf"],"image/prs.pti":["pti"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.airzip.accelerator.azv":["azv"],"image/vnd.blockfact.facti":["facti"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["*sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.microsoft.icon":["ico"],"image/vnd.ms-dds":["dds"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.pco.b16":["b16"],"image/vnd.tencent.tap":["tap"],"image/vnd.valve.source.texture":["vtf"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/vnd.zbrush.pcx":["pcx"],"image/x-3ds":["3ds"],"image/x-adobe-dng":["dng"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["*ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":["*bmp"],"image/x-pcx":["*pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/vnd.wfa.wsc":["wsc"],"model/vnd.bary":["bary"],"model/vnd.cld":["cld"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["*mts"],"model/vnd.opengex":["ogex"],"model/vnd.parasolid.transmit.binary":["x_b"],"model/vnd.parasolid.transmit.text":["x_t"],"model/vnd.pytha.pyox":["pyo","pyox"],"model/vnd.sap.vds":["vds"],"model/vnd.usda":["usda"],"model/vnd.usdz+zip":["usdz"],"model/vnd.valve.source.compiled-map":["bsp"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.familysearch.gedcom":["ged"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":["*org"],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]};Object.freeze(CP);const PP={"application/andrew-inset":["ez"],"application/appinstaller":["appinstaller"],"application/applixware":["aw"],"application/appx":["appx"],"application/appxbundle":["appxbundle"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/automationml-aml+xml":["aml"],"application/automationml-amlx+zip":["amlx"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cpl+xml":["cpl"],"application/cu-seeme":["cu"],"application/cwl":["cwl"],"application/dash+xml":["mpd"],"application/dash-patch+xml":["mpp"],"application/davmount+xml":["davmount"],"application/dicom":["dcm"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdf":["fdf"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["*js"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/media-policy-dataset+xml":["mpf"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["*mp4","*mpg4","mp4s","m4p"],"application/msix":["msix"],"application/msixbundle":["msixbundle"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg","one","onea"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-keys":["asc"],"application/pgp-signature":["sig","*asc"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/sql":["sql"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/watcherinfo+xml":["wif"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xfdf":["xfdf"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"application/zip+dotlottie":["lottie"],"audio/3gpp":["*3gpp"],"audio/aac":["adts","aac"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a","m4b"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avci":["avci"],"image/avcs":["avcs"],"image/avif":["avif"],"image/bmp":["bmp","dib"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/dpx":["dpx"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/ief":["ief"],"image/jaii":["jaii"],"image/jais":["jais"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpg","jpeg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm","jpgm"],"image/jpx":["jpx","jpf"],"image/jxl":["jxl"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/pjpeg":["jfif"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime","mht","mhtml"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/jt":["jt"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/prc":["prc"],"model/step":["step","stp","stpnc","p21","210"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/u3d":["u3d"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/javascript":["js","mjs"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["md","markdown"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/wgsl":["wgsl"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","*jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts","m2t","m2ts","mts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]};Object.freeze(PP);var ao=function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},qc,of,ll;class pU{constructor(...e){qc.set(this,new Map),of.set(this,new Map),ll.set(this,new Map);for(const n of e)this.define(n)}define(e,n=!1){for(let[r,i]of Object.entries(e)){r=r.toLowerCase(),i=i.map(s=>s.toLowerCase()),ao(this,ll,"f").has(r)||ao(this,ll,"f").set(r,new Set);const o=ao(this,ll,"f").get(r);let a=!0;for(let s of i){const l=s.startsWith("*");if(s=l?s.slice(1):s,o?.add(s),a&&ao(this,of,"f").set(r,s),a=!1,l)continue;const u=ao(this,qc,"f").get(s);if(u&&u!=r&&!n)throw new Error(`"${r} -> ${s}" conflicts with "${u} -> ${s}". Pass \`force=true\` to override this definition.`);ao(this,qc,"f").set(s,r)}}return this}getType(e){if(typeof e!="string")return null;const n=e.replace(/^.*[/\\]/s,"").toLowerCase(),r=n.replace(/^.*\./s,"").toLowerCase(),i=n.length<e.length;return!(r.length<n.length-1)&&i?null:ao(this,qc,"f").get(r)??null}getExtension(e){return typeof e!="string"?null:(e=e?.split?.(";")[0],(e&&ao(this,of,"f").get(e.trim().toLowerCase()))??null)}getAllExtensions(e){return typeof e!="string"?null:ao(this,ll,"f").get(e.toLowerCase())??null}_freeze(){this.define=()=>{throw new Error("define() not allowed for built-in Mime objects. See https://github.com/broofa/mime/blob/main/README.md#custom-mime-instances")},Object.freeze(this);for(const e of ao(this,ll,"f").values())Object.freeze(e);return this}_getTestState(){return{types:ao(this,qc,"f"),extensions:ao(this,of,"f")}}}qc=new WeakMap,of=new WeakMap,ll=new WeakMap;const as=new pU(PP,CP)._freeze(),OP=["image","video","audio"],gU=[...OP,"document","other"],mU=/\.(?:csv|docx?|odp|ods|odt|pdf|pptx?|rtf|xlsx?)$/i,Dm=t=>OP.includes(t),Xb=t=>{const e=as.getType(t.path);return Dm(t.kind)||e==="application/pdf"||!!e&&Hf(e)},LP=async t=>{let e="";if(typeof t=="string")if(t.startsWith("blob:"))try{e=(await(await fetch(t)).blob()).type}catch{}else{if(Sh(t)){const{hostname:i,pathname:o}=new URL(t);if(i.startsWith("images."))return"image";t=o}e=as.getType(t)??""}else t instanceof Blob&&(e=t.type);if(!e)return;const[n,r]=e.split("/");if(Dm(n)&&!r.startsWith("x-"))return n},vU=t=>{const e=as.getType(t.path);return!!e&&Hf(e)},sd=t=>as.getType(t)?.match(/^(?<type>image|audio|video)\//)?.groups?.type??(mU.test(t)?"document":"other"),IP=/^(?:.+\/)?(\.git(?:attributes|ignore|keep))$/,Cx=it([]);sn(Cx,t=>t.find(({path:e})=>e===".gitattributes")?.text?.replace(/\r\n?/g,`
|
|
138
138
|
`).split(`
|
|
139
|
-
`).map(e=>e.startsWith("*.")&&e.includes("filter=lfs")?e.split(" ")[0].slice(2).toLowerCase():"").filter(Boolean)??[]);const Rt=(t=0)=>new Promise(e=>{globalThis.setTimeout(()=>{e(void 0)},t)});var i_,yS;function _U(){if(yS)return i_;yS=1;function t(n){return n>=55296&&n<=56319}function e(n){return n>=56320&&n<=57343}return i_=function(r,i,o){if(typeof i!="string")throw new Error("Input must be string");for(var a=i.length,s=0,l,u,d=0;d<a;d+=1){if(l=i.charCodeAt(d),u=i[d],t(l)&&e(i.charCodeAt(d+1))&&(d+=1,u+=i[d]),s+=r(u),s===o)return i.slice(0,d+1);if(s>o)return i.slice(0,d-u.length+1)}return i},i_}var o_,wS;function bU(){if(wS)return o_;wS=1;function t(n){return n>=55296&&n<=56319}function e(n){return n>=56320&&n<=57343}return o_=function(r){if(typeof r!="string")throw new Error("Input must be string");for(var i=r.length,o=0,a=null,s=null,l=0;l<i;l++)a=r.charCodeAt(l),e(a)?s!=null&&t(s)?o+=1:o+=3:a<=127?o+=1:a>=128&&a<=2047?o+=2:a>=2048&&a<=65535&&(o+=3),s=a;return o},o_}var a_,xS;function yU(){if(xS)return a_;xS=1;var t=_U(),e=bU();return a_=t.bind(null,e),a_}var s_,kS;function wU(){if(kS)return s_;kS=1;var t=yU(),e=/[\/\?<>\\:\*\|"]/g,n=/[\x00-\x1f\x80-\x9f]/g,r=/^\.+$/,i=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,o=/[\. ]+$/;function a(s,l){if(typeof s!="string")throw new Error("Input must be string");var u=s.replace(e,l).replace(n,l).replace(r,l).replace(i,l).replace(o,l);return t(u,255)}return s_=function(s,l){var u=l&&l.replacement||"",d=a(s,u);return u===""?d:a(d,"")},s_}var xU=wU();const kU=ts(xU),NP=(t,e)=>new RegExp(`^${t.split("/").map(e).join("\\/")}\\b`),RP=t=>{const e=t.startsWith("@");return e&&(t=t.slice(1)),t=t.split("/").map(n=>encodeURIComponent(n).replace(/[!'()*]/g,r=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`)).join("/"),e?`@${t}`:t},SU=t=>decodeURIComponent(t),Fm=t=>{const e=new Intl.NumberFormat(oe(Bt),{maximumFractionDigits:1}),n=1e3,r=n*1e3,i=r*1e3,o=i*1e3;return t<n?oe(ce)("file_size_units.b",{values:{size:e.format(t)}}):t<r?oe(ce)("file_size_units.kb",{values:{size:e.format(t/n)}}):t<i?oe(ce)("file_size_units.mb",{values:{size:e.format(t/r)}}):t<o?oe(ce)("file_size_units.gb",{values:{size:e.format(t/i)}}):oe(ce)("file_size_units.tb",{values:{size:e.format(t/o)}})},MP=(t,e)=>{if(!e.length)return t;const{filename:n,extension:r}=pn(t),i=new RegExp(`^${Xt(n)}(?:-(?<num>\\d+?))?${r?`\\.${r}`:""}$`),o=e.sort((s,l)=>eo(s.split(".")[0],l.split(".")[0])).findLast(s=>i.test(s));if(!o)return t;const a=Number(o.match(i)?.groups?.num??0)+1;return`${n}-${a}${r?`.${r}`:""}`},Px=(t,{slugificationEnabled:e=!1,assetNamesInSameFolder:n=[]}={})=>{let r=kU(t.normalize().replace(/[\s\u00A0\u202F]+/g," "));if(e){const{filename:i,extension:o}=pn(r);r=`${tL(i)}${o?`.${o}`:""}`}return MP(r,n)},Au=t=>t.filter(Boolean).join("/"),Zb=t=>{const e=t.split("/");let n=!1;return e.forEach((r,i)=>{if(r==="."||r===".."){if(n&&(e[i]=null,r==="..")){const o=e.findLastIndex((a,s)=>!!a&&s<i);o>-1&&(e[o]=null)}}else n=!0}),Au(e)},Ox=t=>typeof t=="string"?new Blob([t],{type:"text/plain"}):t,Bl=async t=>{const n=await Ox(t).arrayBuffer();return zl(new Blob([`blob ${n.byteLength}\0`,n]))},EU="modulepreload",TU=function(t){return"/"+t},SS={},DP=function(e,n,r){let i=Promise.resolve();if(n&&n.length>0){let l=function(u){return Promise.all(u.map(d=>Promise.resolve(d).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),s=a?.nonce||a?.getAttribute("nonce");i=l(n.map(u=>{if(u=TU(u),u in SS)return;SS[u]=!0;const d=u.endsWith(".css"),f=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${f}`))return;const h=document.createElement("link");if(h.rel=d?"stylesheet":EU,d||(h.as="script"),h.crossOrigin="",h.href=u,s&&h.setAttribute("nonce",s),document.head.appendChild(h),d)return new Promise((p,g)=>{h.addEventListener("load",p),h.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${u}`)))})}))}function o(a){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=a,window.dispatchEvent(s),!s.defaultPrevented)throw a}return i.then(a=>{for(const s of a||[])s.status==="rejected"&&o(s.reason);return e().catch(o)})},Qb="0.122.2",$U={"@jsquash/webp":"^1.5.0","@lexical/markdown":"^0.38.2","@sindresorhus/transliterate":"^2.2.0","@sveltia/ui":"^0.31.9","@sveltia/utils":"^0.8.6","create-react-class":"^15.7.0",dayjs:"^1.11.19",deepmerge:"^4.3.1",exifr:"^7.1.3","fast-deep-equal":"^3.1.3",flat:"^6.0.1",immutable:"^5.1.4","isomorphic-dompurify":"^2.33.0",leaflet:"^1.9.4",lexical:"^0.38.2",marked:"^17.0.1","marked-bidi":"^1.0.14",mime:"^4.1.0","parse-entities":"^4.0.2","pdfjs-dist":"^5.4.449",qrcode:"^1.5.4",react:"^19.2.1","react-dom":"^19.2.1","sanitize-filename":"^1.6.3","smol-toml":"^1.5.2","svelte-i18n":"^4.0.1",svgo:"^4.0.0","terra-draw":"^1.20.0","terra-draw-leaflet-adapter":"1.0.3",turndown:"^7.2.2",yaml:"^2.8.2"},Lx=t=>{const e=`https://unpkg.com/${t}`,n=$U[t]?.replace(/^\D/,"");return n?`${e}@${n}`:e},Cu=async(t,e)=>DP(()=>import(`${Lx(t)}/${e}`),[]),dl=(t,e)=>{if(typeof t!="number")return NaN;if(!Number.isFinite(t))return t;const n=10**e;return Math.round(t*n)/n},AU=async(t,e)=>{const r=e==="image"?await ss(t):null;if(!r)return{createdDate:void 0,coordinates:void 0};const{parse:i}=await Cu("exifr","dist/lite.esm.mjs"),{latitude:o,longitude:a,DateTimeOriginal:s,CreateDate:l=s}=await i(r).catch(()=>{})??{};return{createdDate:l instanceof Date?l:void 0,coordinates:Number.isFinite(o)&&Number.isFinite(a)?{latitude:dl(o,7),longitude:dl(a,7)}:void 0}},CU=t=>{const e=new Image;return new Promise(n=>{const r=()=>{n({dimensions:{width:e.naturalWidth,height:e.naturalHeight}})};e.addEventListener("load",r,{once:!0}),e.src=t})},PU=async(t,e)=>{const n=document.createElement(e);return new Promise(r=>{const i=()=>{const{duration:o}=n;e==="audio"&&r({duration:o});const{videoWidth:a,videoHeight:s}=n;r({dimensions:{width:a,height:s},duration:o})};n.addEventListener("loadedmetadata",i,{once:!0}),n.src=t})},OU=async(t,e)=>e==="image"?CU(t):PU(t,e),LU=async(t,e,n)=>{const{dimensions:r,duration:i}=await OU(e,n),{createdDate:o,coordinates:a}=await AU(t,n);return{dimensions:r,duration:i,createdDate:o,coordinates:a}},FP=["avif","gif","jpeg","png","webp"],IU=FP.map(t=>`image/${t}`),ey=/\b(?:avif|gif|jpe?g|png|webp)$/i,NU=["image/svg+xml"],RU=/\b(?:svg)$/i,sa=[...IU,...NU],zP=["webp"],l_={},MU=async t=>{if(t in l_)return l_[t];const e=`image/${t}`,n=new OffscreenCanvas(1,1);n.getContext("2d");const i=(await n.convertToBlob({type:e})).type===e;return l_[t]=i,i},jP=async(t,{format:e="webp",quality:n=85}={})=>{const r=`image/${e}`;if(!await MU(e)&&zP.includes(e)){const o=t.getContext("2d").getImageData(0,0,t.width,t.height);try{const a=(await Cu(`@jsquash/${e}`,"encode.js?module")).default,s=await a(o,{quality:n});return new Blob([s],{type:r})}catch{}}return t.convertToBlob({type:r,quality:n/100})},DU=({width:t,height:e},{width:n=t,height:r=e,fit:i="scale-down"}={})=>{const o={scale:1,width:t,height:e};if(t===r&&e===r)return o;const a=t>e,s=t<r||e<r;let l=1,u=0,d=0;if(i==="scale-down"){if(s)return o;i="contain"}return i==="contain"&&(a?(n>r?(l=n/t,u=n):(l=r/t,u=r),d=e*l):(n>r?(l=r/e,d=r):(l=n/e,d=n),u=t*l)),{scale:l,width:u,height:d}},UP=(t,e,n)=>{const{scale:r,width:i,height:o}=DU(e,n);return t.width=i,t.height=o,{scale:r,width:i,height:o}},FU=async({blob:t})=>{const e=URL.createObjectURL(t),n=new Image;return new Promise(r=>{n.addEventListener("load",()=>{r({source:n,naturalWidth:n.naturalWidth,naturalHeight:n.naturalHeight}),URL.revokeObjectURL(e)},{once:!0}),n.src=e})},zU=async({blob:t})=>{const e=URL.createObjectURL(t),n=document.createElement("video");return new Promise(r=>{n.addEventListener("canplay",()=>{n.pause(),r({source:n,naturalWidth:n.videoWidth,naturalHeight:n.videoHeight}),URL.revokeObjectURL(e)},{once:!0}),n.muted=!0,n.autoplay=!0,n.playsInline=!0,n.src=e,n.style.opacity="0",n.style.pointerEvents="none",document.body.appendChild(n)})},jU=async t=>t.type.startsWith("video/")?zU({blob:t}):FU({blob:t}),Ix=async(t,{format:e="png",quality:n=85,width:r=void 0,height:i=void 0,fit:o="scale-down"}={})=>{let a,s=0,l=0;try{a=await createImageBitmap(t),{width:s,height:l}=a}catch{({source:a,naturalWidth:s,naturalHeight:l}=await jU(t))}r??=s,i??=l;const u=new OffscreenCanvas(512,512),d=u.getContext("2d");return UP(u,{width:s,height:l},{fit:o,width:r,height:i}),d.drawImage(a,0,0,u.width,u.height),a instanceof HTMLVideoElement&&document.body.removeChild(a),jP(u,{format:e,quality:n})},UU=async t=>{const e=await t.text();try{const{optimize:n}=await Cu("svgo","dist/svgo.browser.js"),{data:r}=n(e);return new Blob([r],{type:t.type})}catch{}return t},Zc=Lx("pdfjs-dist"),BU=`${Zc}/build/pdf.min.mjs`,qU=`${Zc}/build/pdf.worker.min.mjs`,HU={isEvalSupported:!1,disableAutoFetch:!0,cMapUrl:`${Zc}/cmaps/`,iccUrl:`${Zc}/iccs/`,standardFontDataUrl:`${Zc}/standard_fonts/`,wasmUrl:`${Zc}/wasm/`};let yp;const KU=async(t,{format:e="png",quality:n=85,width:r=void 0,height:i=void 0,fit:o="scale-down"}={})=>{if(!yp)try{yp=await import(BU),yp.GlobalWorkerOptions.workerSrc=qU}catch{throw new Error("Failed to load PDF.js library")}const a=URL.createObjectURL(t),s=new OffscreenCanvas(512,512),l=s.getContext("2d");try{const d=await(await yp.getDocument({...HU,url:a}).promise).getPage(1),f=d.getViewport({scale:1}),{scale:h}=UP(s,{width:f.width,height:f.height},{width:r,height:i,fit:o});await d.render({canvasContext:l,viewport:h===1?f:d.getViewport({scale:h})}).promise,URL.revokeObjectURL(a)}catch{throw new Error("Failed to render PDF")}return jP(s,{format:e,quality:n})},c_=new Set,ss=async(t,e=0)=>{const{file:n,handle:r,blobURL:i,name:o,path:a}=t;if(i)return fetch(i).then(l=>l.blob());let s;if(n)s=n;else if(r)try{s=await r.getFile()}catch{throw new Error("Failed to retrieve blob from file handle")}else{if(c_.has(a)&&e<=25)return await Rt(200),ss(t,e+1);c_.add(a);const l=await oe(Cn)?.fetchBlob?.(t);if(!l)throw new Error("Failed to retrieve blob");s=new Blob([l],{type:as.getType(o)??l.type})}return t.blobURL=URL.createObjectURL(s),c_.delete(a),s},Nx=async t=>(t.blobURL||await ss(t),t.blobURL);let wp;const ty=async(t,{cacheOnly:e=!1}={})=>{const n=t.name.endsWith(".pdf");if(!(["image","video"].includes(t.kind)||n))return;if(wp===void 0){const{databaseName:i}=oe(Cn)?.repository??{};wp=i?new jo(i,"asset-thumbnails"):null}let r=await wp?.get(t.sha);if(!r){if(e)return;const i=await ss(t),o={format:"webp",quality:85,width:512,height:512,fit:"contain"};r=n?await KU(i,o):await Ix(i,o),await wp?.set(t.sha,r)}return URL.createObjectURL(r)},Wf=(t,{pathOnly:e=!1,allowSpecial:n=!1,entry:r=void 0}={})=>{const{publicPath:i,entryRelative:o,hasTemplateTags:a}=t.folder.collectionName===void 0?t.folder:Em(t.path).find(({collectionName:d})=>d!==void 0)??oe(ed);if(o)return e&&r&&pn(t.path).dirname===pn(Object.values(r.locales)[0].path).dirname?t.name:void 0;const{_baseURL:s="",output:{encode_file_path:l=!1}={}}=oe(Pt);let u=a?t.path.replace(NP(t.folder.internalPath??"",d=>{const f=d.match(/{{(?<tag>.+?)}}/)?.groups?.tag;return f?`(?<${f}>[^/]+)`:Xt(d)}),i?.replaceAll(/{{(.+?)}}/g,"$<$1>")??""):t.path.replace(t.folder.internalPath??"",i==="/"?"":i??"");if(l&&(u=RP(u)),!(!u.startsWith("/")&&!n))return e?u:`${s}${u}`},ql=async({value:t,entry:e,collectionName:n,fileName:r,thumbnail:i=!1})=>{if(!t)return;if(/^(?:https?|data|blob):/.test(t))return t;const o=m0({value:t,entry:e,collectionName:n,fileName:r});if(o)return(i?await ty(o):await Nx(o))??Wf(o)},wg={publicURL:void 0,repoBlobURL:void 0,dimensions:void 0,duration:void 0,usedEntries:[]},zm=async t=>{const{kind:e,path:n}=t,{blobBaseURL:r}=oe(Cn)?.repository??{},i=await Nx(t),o=Wf(t,{allowSpecial:!0,pathOnly:!0})??i;let a={};return["image","video","audio"].includes(e)&&i&&(a=await LU(t,i,e)),{...a,publicURL:Wf(t),repoBlobURL:r?`${r}/${n}`:void 0,usedEntries:o?await sy(o):[]}},jr=t=>{let e;if(t!=="_default")try{[e]=Intl.getCanonicalLocales(t)}catch{}return e},Uo=(t,{displayLocale:e=jr(oe(Bt)??"en")}={})=>{const n=jr(t);if(!n)return;const r=new Intl.DisplayNames(e,{type:"language"});try{return r.of(n)}catch(i){console.error(i);return}},Hl=(t,e={})=>new Intl.ListFormat(jr(t),{style:"narrow",type:"conjunction",...e}),Rx=({_i18n:t,locale:e,path:n})=>{const{defaultLocale:r,omitDefaultLocaleFromFileName:i}=t;return i&&e===r&&(n=n.replace(/\.{{locale}}\.(\w+)$/,".$1")),n.replaceAll("{{locale}}",e)},VU=/^(?:\d{4}-[01]\d-[0-3]\d)?(?:T?[0-2]\d:[0-5]\d)?(?::[0-5]\d)?(?:\.\d+)?(?:[+-][0-2]\d:[0-5]\d|Z)?$/,GU=/^\d{4}-[01]\d-[0-3]\d$/,WU=/T00:00(?::00)?(?:\.000)?Z$/,ny={year:"numeric",month:"short",day:"numeric"},ry={hour:"numeric",minute:"numeric",hour12:!0},YU={...ny,...ry};wr.extend(Tx);wr.extend($x);wr.extend(Ax);const Js=t=>{const{format:e,date_format:n=void 0,time_format:r=void 0,picker_utc:i=!1}=t;return{format:e||[typeof n=="string"?n:"",typeof r=="string"?r:""].join(" ").trim()||void 0,dateOnly:r===!1,timeOnly:n===!1,utc:i}},Pu=(t,e)=>{const{format:n,timeOnly:r,utc:i}=Js(e);if(t)try{return n?(i?wr.utc:wr)(t,n).toDate():r?new Date(`${new Date().toJSON().split("T")[0]}T${t}`):new Date(t)}catch(o){console.error(o);return}},BP=t=>{const{dateOnly:e,timeOnly:n,utc:r}=Js(t),{year:i,month:o,day:a,hour:s,minute:l}=jl({timeZone:r?"UTC":void 0}),u=`${i}-${o}-${a}`,d=`${s}:${l}`;return e?u:n?d:r?`${u}T${d}:00.000Z`:`${u}T${d}`},qP=(t,e,n)=>{const{format:r,dateOnly:i,timeOnly:o,utc:a}=Js(n),s=i?"YYYY-MM-DD":o?"HH:mm":"YYYY-MM-DDTHH:mm",l=`:00${e?.endsWith(".000")?".000":""}`;if(t==="")return"";if(t)try{if(r){const u=(a?wr.utc:wr)(t,s).format(r);return r.includes("Z")&&u.endsWith("+00:00")?u.replace("+00:00","Z"):u}return i?t:a?`${t}:00.000Z`:`${t}${l}`}catch(u){console.error(u);return}},JU=(t,e)=>{const{dateOnly:n,timeOnly:r,utc:i}=Js(e);if(!t)return"";const o=n?t?.match(/^(?<date>\d{4}-[01]\d-[0-3]\d)\b/)?.groups?.date:r?t?.match(/(?:^|T)(?<time>[0-2]\d:[0-5]\d)\b/)?.groups?.time:void 0;if(o)return o;try{const a=t?Pu(t,e):new Date;if(t&&!a||t&&a&&Number.isNaN(a.getTime()))return"";const{year:s,month:l,day:u,hour:d,minute:f}=jl({date:a,timeZone:i?"UTC":void 0}),h=`${s}-${l}-${u}`,p=`${d}:${f}`;return n?h:r?p:`${h}T${p}`}catch(a){return console.error(a),""}},HP=({locale:t,fieldConfig:e,currentValue:n})=>{const{format:r,dateOnly:i,timeOnly:o,utc:a}=Js(e);if(typeof n!="string"||!n.trim())return"";if(r)try{return(a?wr.utc:wr)(n,r).format(r)}catch{}const s=Pu(n,e),l=jr(t);return!s||Number.isNaN(s.getTime())?"":o?s.toLocaleTimeString(l,ry):i?s.toLocaleDateString(l,{...ny,timeZone:a||GU.test(n)||WU.test(n)?"UTC":void 0}):s.toLocaleString(l,{...ny,...ry,timeZone:a?"UTC":void 0,timeZoneName:a?void 0:"short"})};wr.extend(Tx);wr.extend($x);wr.extend(Ax);const Mx=/^date\('(?<format>.+?)'(?:,\s*'(?<timeZone>.+?)')?\)$/,KP=/^default\('(?<defaultValue>.+?)'\)$/,VP=/^ternary\('(?<truthyValue>.*?)',\s*'(?<falsyValue>.*?)'\)$/,XU=/^truncate\((?<max>\d+)(?:,\s*'(?<ellipsis>.+?)')?\)$/,ZU=t=>String(t).toUpperCase(),QU=t=>String(t).toLowerCase(),eB=(t,{format:e,timeZone:n},r)=>{const i=String(t),{dateOnly:o,utc:a}=Js(r),l=(n==="utc"||a||o&&!!i.match(/^\d{4}-[01]\d-[0-3]\d$/)||o&&!!i.match(/T\d{2}:\d{2}(?::\d{2})?(?:\.\d+)?Z$/)?wr.utc:wr)(i);return l.isValid()?l.format(e):""},tB=(t,{defaultValue:e})=>t?String(t):e,nB=(t,{truthyValue:e,falsyValue:n})=>t?e:n,rB=(t,{max:e,ellipsis:n="…"})=>_2(String(t),Number(e),{ellipsis:n}),iB=({fieldConfig:t,value:e,transformation:n})=>{if(n==="upper")return ZU(e);if(n==="lower")return QU(e);const r=n.match(Mx);if(r?.groups)return eB(e,r.groups,t??{});const i=n.match(KP);if(i?.groups)return tB(e,i.groups);const o=n.match(VP);if(o?.groups)return nB(e,o.groups);const a=n.match(XU);return a?.groups?rB(e,a.groups):String(e)},Dx=({fieldConfig:t,value:e,transformations:n})=>(n.forEach(r=>{e=iB({fieldConfig:t,value:e,transformation:r})}),e),Fx=["file","image"],jm=[...Fx,"relation","select"],GP=[...jm,"list","number"],WP=({multiline:t,dotAll:e,source:n})=>t||e||n.includes("[\\s\\S]")||n.includes("[\\S\\s]"),YP=t=>zo(Object.fromEntries(Object.entries(Pi(t)).filter(([e])=>!e.split(".").pop()?.startsWith("__sc_")))),JP=t=>t.replace(/"/g,"'"),ml=t=>t.replace(/"/g,"""),zx=/!\[(?<alt>(?:[^\]\\]|\\.)*)\]\((?<src>(?:[^"()\\]|\\.|\([^)]*\)|"[^"]*")*?)(?:\s+"(?<title>(?:[^"\\]|\\.)*)")?\)/,oB=new RegExp(zx,"g"),aB=/\[!\[(?<alt2>(?:[^\]\\]|\\.)*)\]\((?<src2>(?:[^"()\\]|\\.|\([^)]*\)|"[^"]*")*?)(?:\s+"(?<title2>(?:[^"\\]|\\.)*)")?\)\](?:\((?<link>[^)]*\([^)]*\)[^)]*|[^)]*)\))/,sB=new RegExp(`${zx.source}|${aB.source}`),xg=new Map,XP={id:"image",label:"Image",fields:[{name:"src",label:"Source",widget:"image"},{name:"alt",label:"Alt Text",required:!1},{name:"title",label:"Title",required:!1}],pattern:zx,toBlock:t=>{const{src:e="",alt:n="",title:r=""}=t;return e?`}"`:""})`:""},toPreview:t=>{const{src:e="",alt:n="",title:r=""}=t;return`<img src="${ml(e)}" alt="${ml(n)}" title="${ml(r)}">`}},lB={id:"linked-image",label:"Image",fields:[...XP.fields,{name:"link",label:"Link",required:!1}],pattern:sB,fromBlock:t=>{const{src:e,alt:n,title:r,src2:i,alt2:o,title2:a,link:s}=t.groups??{};return{src:(e||i||"").trim(),alt:(n||o||"").trim(),title:(r||a||"").trim(),link:(s||"").trim()}},toBlock:t=>{const{src:e="",alt:n="",title:r="",link:i=""}=t,o=e?`}"`:""})`:"";return o&&i?`[${o}](${i})`:o},toPreview:t=>{const{src:e="",alt:n="",title:r="",link:i=""}=t,o=`<img src="${ml(e)}" alt="${ml(n)}" title="${ml(r)}">`;return i?`<a href="${ml(i)}">${o}</a>`:o}},ZP=t=>{if(xg.has(t))return xg.get(t);const e={icon:"image",label:oe(ce)("editor_components.image"),fields:[{name:"src",label:oe(ce)("editor_components.src"),widget:"image"},{name:"alt",label:oe(ce)("editor_components.alt"),required:!1},{name:"title",label:oe(ce)("editor_components.title"),required:!1}]};return{image:{...XP,...e},"linked-image":{...lB,...e,fields:[...e.fields,{name:"link",label:oe(ce)("editor_components.link"),required:!1}]}}[t]};var u_,ES;function TS(){if(ES)return u_;ES=1;const{entries:t,setPrototypeOf:e,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:i}=Object;let{freeze:o,seal:a,create:s}=Object,{apply:l,construct:u}=typeof Reflect<"u"&&Reflect;o||(o=function(Pe){return Pe}),a||(a=function(Pe){return Pe}),l||(l=function(Pe,$e){for(var Ee=arguments.length,qe=new Array(Ee>2?Ee-2:0),Ke=2;Ke<Ee;Ke++)qe[Ke-2]=arguments[Ke];return Pe.apply($e,qe)}),u||(u=function(Pe){for(var $e=arguments.length,Ee=new Array($e>1?$e-1:0),qe=1;qe<$e;qe++)Ee[qe-1]=arguments[qe];return new Pe(...Ee)});const d=k(Array.prototype.forEach),f=k(Array.prototype.lastIndexOf),h=k(Array.prototype.pop),p=k(Array.prototype.push),g=k(Array.prototype.splice),m=k(String.prototype.toLowerCase),v=k(String.prototype.toString),b=k(String.prototype.match),y=k(String.prototype.replace),w=k(String.prototype.indexOf),x=k(String.prototype.trim),E=k(Object.prototype.hasOwnProperty),$=k(RegExp.prototype.test),A=T(TypeError);function k(Ie){return function(Pe){Pe instanceof RegExp&&(Pe.lastIndex=0);for(var $e=arguments.length,Ee=new Array($e>1?$e-1:0),qe=1;qe<$e;qe++)Ee[qe-1]=arguments[qe];return l(Ie,Pe,Ee)}}function T(Ie){return function(){for(var Pe=arguments.length,$e=new Array(Pe),Ee=0;Ee<Pe;Ee++)$e[Ee]=arguments[Ee];return u(Ie,$e)}}function C(Ie,Pe){let $e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:m;e&&e(Ie,null);let Ee=Pe.length;for(;Ee--;){let qe=Pe[Ee];if(typeof qe=="string"){const Ke=$e(qe);Ke!==qe&&(n(Pe)||(Pe[Ee]=Ke),qe=Ke)}Ie[qe]=!0}return Ie}function P(Ie){for(let Pe=0;Pe<Ie.length;Pe++)E(Ie,Pe)||(Ie[Pe]=null);return Ie}function O(Ie){const Pe=s(null);for(const[$e,Ee]of t(Ie))E(Ie,$e)&&(Array.isArray(Ee)?Pe[$e]=P(Ee):Ee&&typeof Ee=="object"&&Ee.constructor===Object?Pe[$e]=O(Ee):Pe[$e]=Ee);return Pe}function I(Ie,Pe){for(;Ie!==null;){const Ee=i(Ie,Pe);if(Ee){if(Ee.get)return k(Ee.get);if(typeof Ee.value=="function")return k(Ee.value)}Ie=r(Ie)}function $e(){return null}return $e}const L=o(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),D=o(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),B=o(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),K=o(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),G=o(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),W=o(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Y=o(["#text"]),R=o(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),q=o(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),J=o(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Q=o(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ee=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),re=a(/<%[\w\W]*|[\w\W]*%>/gm),te=a(/\$\{[\w\W]*/gm),de=a(/^data-[\-\w.\u00B7-\uFFFF]+$/),he=a(/^aria-[\-\w]+$/),ue=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ge=a(/^(?:\w+script|data):/i),ye=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),me=a(/^html$/i),Ae=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var Ce=Object.freeze({__proto__:null,ARIA_ATTR:he,ATTR_WHITESPACE:ye,CUSTOM_ELEMENT:Ae,DATA_ATTR:de,DOCTYPE_NAME:me,ERB_EXPR:re,IS_ALLOWED_URI:ue,IS_SCRIPT_OR_DATA:ge,MUSTACHE_EXPR:ee,TMPLIT_EXPR:te});const _e={element:1,text:3,progressingInstruction:7,comment:8,document:9},fe=function(){return typeof window>"u"?null:window},be=function(Pe,$e){if(typeof Pe!="object"||typeof Pe.createPolicy!="function")return null;let Ee=null;const qe="data-tt-policy-suffix";$e&&$e.hasAttribute(qe)&&(Ee=$e.getAttribute(qe));const Ke="dompurify"+(Ee?"#"+Ee:"");try{return Pe.createPolicy(Ke,{createHTML(lt){return lt},createScriptURL(lt){return lt}})}catch{return console.warn("TrustedTypes policy "+Ke+" could not be created."),null}},Oe=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function je(){let Ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:fe();const Pe=dt=>je(dt);if(Pe.version="3.3.0",Pe.removed=[],!Ie||!Ie.document||Ie.document.nodeType!==_e.document||!Ie.Element)return Pe.isSupported=!1,Pe;let{document:$e}=Ie;const Ee=$e,qe=Ee.currentScript,{DocumentFragment:Ke,HTMLTemplateElement:lt,Node:Te,Element:Me,NodeFilter:pe,NamedNodeMap:Le=Ie.NamedNodeMap||Ie.MozNamedAttrMap,HTMLFormElement:Ne,DOMParser:nt,trustedTypes:We}=Ie,Ze=Me.prototype,st=I(Ze,"cloneNode"),_t=I(Ze,"remove"),Ft=I(Ze,"nextSibling"),ln=I(Ze,"childNodes"),qt=I(Ze,"parentNode");if(typeof lt=="function"){const dt=$e.createElement("template");dt.content&&dt.content.ownerDocument&&($e=dt.content.ownerDocument)}let Et,Yt="";const{implementation:wt,createNodeIterator:Lt,createDocumentFragment:gr,getElementsByTagName:vn}=$e,{importNode:Xn}=Ee;let kt=Oe();Pe.isSupported=typeof t=="function"&&typeof qt=="function"&&wt&&wt.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:cn,ERB_EXPR:ut,TMPLIT_EXPR:pt,DATA_ATTR:_n,ARIA_ATTR:Rn,IS_SCRIPT_OR_DATA:Pn,ATTR_WHITESPACE:bn,CUSTOM_ELEMENT:un}=Ce;let{IS_ALLOWED_URI:yn}=Ce,It=null;const kr=C({},[...L,...D,...B,...G,...Y]);let Ht=null;const Si=C({},[...R,...q,...J,...Q]);let Tt=Object.seal(s(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ni=null,Fi=null;const oo=Object.seal(s(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ds=!0,On=!0,ft=!1,Ct=!0,dn=!1,sr=!0,mr=!1,ko=!1,Zn=!1,Mn=!1,qr=!1,Hr=!1,Ei=!0,Gn=!1;const Or="user-content-";let ri=!0,Od=!1,Ac={},Cc=null;const M1=C({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let D1=null;const F1=C({},["audio","video","img","source","image","track"]);let Sv=null;const z1=C({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),op="http://www.w3.org/1998/Math/MathML",ap="http://www.w3.org/2000/svg",$a="http://www.w3.org/1999/xhtml";let Pc=$a,Ev=!1,Tv=null;const hM=C({},[op,ap,$a],v);let sp=C({},["mi","mo","mn","ms","mtext"]),lp=C({},["annotation-xml"]);const pM=C({},["title","style","font","a","script"]);let Ld=null;const gM=["application/xhtml+xml","text/html"],mM="text/html";let Sr=null,Oc=null;const vM=$e.createElement("form"),j1=function(le){return le instanceof RegExp||le instanceof Function},$v=function(){let le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Oc&&Oc===le)){if((!le||typeof le!="object")&&(le={}),le=O(le),Ld=gM.indexOf(le.PARSER_MEDIA_TYPE)===-1?mM:le.PARSER_MEDIA_TYPE,Sr=Ld==="application/xhtml+xml"?v:m,It=E(le,"ALLOWED_TAGS")?C({},le.ALLOWED_TAGS,Sr):kr,Ht=E(le,"ALLOWED_ATTR")?C({},le.ALLOWED_ATTR,Sr):Si,Tv=E(le,"ALLOWED_NAMESPACES")?C({},le.ALLOWED_NAMESPACES,v):hM,Sv=E(le,"ADD_URI_SAFE_ATTR")?C(O(z1),le.ADD_URI_SAFE_ATTR,Sr):z1,D1=E(le,"ADD_DATA_URI_TAGS")?C(O(F1),le.ADD_DATA_URI_TAGS,Sr):F1,Cc=E(le,"FORBID_CONTENTS")?C({},le.FORBID_CONTENTS,Sr):M1,ni=E(le,"FORBID_TAGS")?C({},le.FORBID_TAGS,Sr):O({}),Fi=E(le,"FORBID_ATTR")?C({},le.FORBID_ATTR,Sr):O({}),Ac=E(le,"USE_PROFILES")?le.USE_PROFILES:!1,ds=le.ALLOW_ARIA_ATTR!==!1,On=le.ALLOW_DATA_ATTR!==!1,ft=le.ALLOW_UNKNOWN_PROTOCOLS||!1,Ct=le.ALLOW_SELF_CLOSE_IN_ATTR!==!1,dn=le.SAFE_FOR_TEMPLATES||!1,sr=le.SAFE_FOR_XML!==!1,mr=le.WHOLE_DOCUMENT||!1,Mn=le.RETURN_DOM||!1,qr=le.RETURN_DOM_FRAGMENT||!1,Hr=le.RETURN_TRUSTED_TYPE||!1,Zn=le.FORCE_BODY||!1,Ei=le.SANITIZE_DOM!==!1,Gn=le.SANITIZE_NAMED_PROPS||!1,ri=le.KEEP_CONTENT!==!1,Od=le.IN_PLACE||!1,yn=le.ALLOWED_URI_REGEXP||ue,Pc=le.NAMESPACE||$a,sp=le.MATHML_TEXT_INTEGRATION_POINTS||sp,lp=le.HTML_INTEGRATION_POINTS||lp,Tt=le.CUSTOM_ELEMENT_HANDLING||{},le.CUSTOM_ELEMENT_HANDLING&&j1(le.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Tt.tagNameCheck=le.CUSTOM_ELEMENT_HANDLING.tagNameCheck),le.CUSTOM_ELEMENT_HANDLING&&j1(le.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Tt.attributeNameCheck=le.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),le.CUSTOM_ELEMENT_HANDLING&&typeof le.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Tt.allowCustomizedBuiltInElements=le.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),dn&&(On=!1),qr&&(Mn=!0),Ac&&(It=C({},Y),Ht=[],Ac.html===!0&&(C(It,L),C(Ht,R)),Ac.svg===!0&&(C(It,D),C(Ht,q),C(Ht,Q)),Ac.svgFilters===!0&&(C(It,B),C(Ht,q),C(Ht,Q)),Ac.mathMl===!0&&(C(It,G),C(Ht,J),C(Ht,Q))),le.ADD_TAGS&&(typeof le.ADD_TAGS=="function"?oo.tagCheck=le.ADD_TAGS:(It===kr&&(It=O(It)),C(It,le.ADD_TAGS,Sr))),le.ADD_ATTR&&(typeof le.ADD_ATTR=="function"?oo.attributeCheck=le.ADD_ATTR:(Ht===Si&&(Ht=O(Ht)),C(Ht,le.ADD_ATTR,Sr))),le.ADD_URI_SAFE_ATTR&&C(Sv,le.ADD_URI_SAFE_ATTR,Sr),le.FORBID_CONTENTS&&(Cc===M1&&(Cc=O(Cc)),C(Cc,le.FORBID_CONTENTS,Sr)),ri&&(It["#text"]=!0),mr&&C(It,["html","head","body"]),It.table&&(C(It,["tbody"]),delete ni.tbody),le.TRUSTED_TYPES_POLICY){if(typeof le.TRUSTED_TYPES_POLICY.createHTML!="function")throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof le.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Et=le.TRUSTED_TYPES_POLICY,Yt=Et.createHTML("")}else Et===void 0&&(Et=be(We,qe)),Et!==null&&typeof Yt=="string"&&(Yt=Et.createHTML(""));o&&o(le),Oc=le}},U1=C({},[...D,...B,...K]),B1=C({},[...G,...W]),_M=function(le){let Ve=qt(le);(!Ve||!Ve.tagName)&&(Ve={namespaceURI:Pc,tagName:"template"});const ct=m(le.tagName),Dn=m(Ve.tagName);return Tv[le.namespaceURI]?le.namespaceURI===ap?Ve.namespaceURI===$a?ct==="svg":Ve.namespaceURI===op?ct==="svg"&&(Dn==="annotation-xml"||sp[Dn]):!!U1[ct]:le.namespaceURI===op?Ve.namespaceURI===$a?ct==="math":Ve.namespaceURI===ap?ct==="math"&&lp[Dn]:!!B1[ct]:le.namespaceURI===$a?Ve.namespaceURI===ap&&!lp[Dn]||Ve.namespaceURI===op&&!sp[Dn]?!1:!B1[ct]&&(pM[ct]||!U1[ct]):!!(Ld==="application/xhtml+xml"&&Tv[le.namespaceURI]):!1},Yo=function(le){p(Pe.removed,{element:le});try{qt(le).removeChild(le)}catch{_t(le)}},il=function(le,Ve){try{p(Pe.removed,{attribute:Ve.getAttributeNode(le),from:Ve})}catch{p(Pe.removed,{attribute:null,from:Ve})}if(Ve.removeAttribute(le),le==="is")if(Mn||qr)try{Yo(Ve)}catch{}else try{Ve.setAttribute(le,"")}catch{}},q1=function(le){let Ve=null,ct=null;if(Zn)le="<remove></remove>"+le;else{const lr=b(le,/^[\r\n\t ]+/);ct=lr&&lr[0]}Ld==="application/xhtml+xml"&&Pc===$a&&(le='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+le+"</body></html>");const Dn=Et?Et.createHTML(le):le;if(Pc===$a)try{Ve=new nt().parseFromString(Dn,Ld)}catch{}if(!Ve||!Ve.documentElement){Ve=wt.createDocument(Pc,"template",null);try{Ve.documentElement.innerHTML=Ev?Yt:Dn}catch{}}const Kr=Ve.body||Ve.documentElement;return le&&ct&&Kr.insertBefore($e.createTextNode(ct),Kr.childNodes[0]||null),Pc===$a?vn.call(Ve,mr?"html":"body")[0]:mr?Ve.documentElement:Kr},H1=function(le){return Lt.call(le.ownerDocument||le,le,pe.SHOW_ELEMENT|pe.SHOW_COMMENT|pe.SHOW_TEXT|pe.SHOW_PROCESSING_INSTRUCTION|pe.SHOW_CDATA_SECTION,null)},Av=function(le){return le instanceof Ne&&(typeof le.nodeName!="string"||typeof le.textContent!="string"||typeof le.removeChild!="function"||!(le.attributes instanceof Le)||typeof le.removeAttribute!="function"||typeof le.setAttribute!="function"||typeof le.namespaceURI!="string"||typeof le.insertBefore!="function"||typeof le.hasChildNodes!="function")},K1=function(le){return typeof Te=="function"&&le instanceof Te};function Aa(dt,le,Ve){d(dt,ct=>{ct.call(Pe,le,Ve,Oc)})}const V1=function(le){let Ve=null;if(Aa(kt.beforeSanitizeElements,le,null),Av(le))return Yo(le),!0;const ct=Sr(le.nodeName);if(Aa(kt.uponSanitizeElement,le,{tagName:ct,allowedTags:It}),sr&&le.hasChildNodes()&&!K1(le.firstElementChild)&&$(/<[/\w!]/g,le.innerHTML)&&$(/<[/\w!]/g,le.textContent)||le.nodeType===_e.progressingInstruction||sr&&le.nodeType===_e.comment&&$(/<[/\w]/g,le.data))return Yo(le),!0;if(!(oo.tagCheck instanceof Function&&oo.tagCheck(ct))&&(!It[ct]||ni[ct])){if(!ni[ct]&&W1(ct)&&(Tt.tagNameCheck instanceof RegExp&&$(Tt.tagNameCheck,ct)||Tt.tagNameCheck instanceof Function&&Tt.tagNameCheck(ct)))return!1;if(ri&&!Cc[ct]){const Dn=qt(le)||le.parentNode,Kr=ln(le)||le.childNodes;if(Kr&&Dn){const lr=Kr.length;for(let Ti=lr-1;Ti>=0;--Ti){const Ca=st(Kr[Ti],!0);Ca.__removalCount=(le.__removalCount||0)+1,Dn.insertBefore(Ca,Ft(le))}}}return Yo(le),!0}return le instanceof Me&&!_M(le)||(ct==="noscript"||ct==="noembed"||ct==="noframes")&&$(/<\/no(script|embed|frames)/i,le.innerHTML)?(Yo(le),!0):(dn&&le.nodeType===_e.text&&(Ve=le.textContent,d([cn,ut,pt],Dn=>{Ve=y(Ve,Dn," ")}),le.textContent!==Ve&&(p(Pe.removed,{element:le.cloneNode()}),le.textContent=Ve)),Aa(kt.afterSanitizeElements,le,null),!1)},G1=function(le,Ve,ct){if(Ei&&(Ve==="id"||Ve==="name")&&(ct in $e||ct in vM))return!1;if(!(On&&!Fi[Ve]&&$(_n,Ve))){if(!(ds&&$(Rn,Ve))){if(!(oo.attributeCheck instanceof Function&&oo.attributeCheck(Ve,le))){if(!Ht[Ve]||Fi[Ve]){if(!(W1(le)&&(Tt.tagNameCheck instanceof RegExp&&$(Tt.tagNameCheck,le)||Tt.tagNameCheck instanceof Function&&Tt.tagNameCheck(le))&&(Tt.attributeNameCheck instanceof RegExp&&$(Tt.attributeNameCheck,Ve)||Tt.attributeNameCheck instanceof Function&&Tt.attributeNameCheck(Ve,le))||Ve==="is"&&Tt.allowCustomizedBuiltInElements&&(Tt.tagNameCheck instanceof RegExp&&$(Tt.tagNameCheck,ct)||Tt.tagNameCheck instanceof Function&&Tt.tagNameCheck(ct))))return!1}else if(!Sv[Ve]){if(!$(yn,y(ct,bn,""))){if(!((Ve==="src"||Ve==="xlink:href"||Ve==="href")&&le!=="script"&&w(ct,"data:")===0&&D1[le])){if(!(ft&&!$(Pn,y(ct,bn,"")))){if(ct)return!1}}}}}}}return!0},W1=function(le){return le!=="annotation-xml"&&b(le,un)},Y1=function(le){Aa(kt.beforeSanitizeAttributes,le,null);const{attributes:Ve}=le;if(!Ve||Av(le))return;const ct={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ht,forceKeepAttr:void 0};let Dn=Ve.length;for(;Dn--;){const Kr=Ve[Dn],{name:lr,namespaceURI:Ti,value:Ca}=Kr,Lc=Sr(lr),Cv=Ca;let Lr=lr==="value"?Cv:x(Cv);if(ct.attrName=Lc,ct.attrValue=Lr,ct.keepAttr=!0,ct.forceKeepAttr=void 0,Aa(kt.uponSanitizeAttribute,le,ct),Lr=ct.attrValue,Gn&&(Lc==="id"||Lc==="name")&&(il(lr,le),Lr=Or+Lr),sr&&$(/((--!?|])>)|<\/(style|title|textarea)/i,Lr)){il(lr,le);continue}if(Lc==="attributename"&&b(Lr,"href")){il(lr,le);continue}if(ct.forceKeepAttr)continue;if(!ct.keepAttr){il(lr,le);continue}if(!Ct&&$(/\/>/i,Lr)){il(lr,le);continue}dn&&d([cn,ut,pt],X1=>{Lr=y(Lr,X1," ")});const J1=Sr(le.nodeName);if(!G1(J1,Lc,Lr)){il(lr,le);continue}if(Et&&typeof We=="object"&&typeof We.getAttributeType=="function"&&!Ti)switch(We.getAttributeType(J1,Lc)){case"TrustedHTML":{Lr=Et.createHTML(Lr);break}case"TrustedScriptURL":{Lr=Et.createScriptURL(Lr);break}}if(Lr!==Cv)try{Ti?le.setAttributeNS(Ti,lr,Lr):le.setAttribute(lr,Lr),Av(le)?Yo(le):h(Pe.removed)}catch{il(lr,le)}}Aa(kt.afterSanitizeAttributes,le,null)},bM=function dt(le){let Ve=null;const ct=H1(le);for(Aa(kt.beforeSanitizeShadowDOM,le,null);Ve=ct.nextNode();)Aa(kt.uponSanitizeShadowNode,Ve,null),V1(Ve),Y1(Ve),Ve.content instanceof Ke&&dt(Ve.content);Aa(kt.afterSanitizeShadowDOM,le,null)};return Pe.sanitize=function(dt){let le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ve=null,ct=null,Dn=null,Kr=null;if(Ev=!dt,Ev&&(dt="<!-->"),typeof dt!="string"&&!K1(dt))if(typeof dt.toString=="function"){if(dt=dt.toString(),typeof dt!="string")throw A("dirty is not a string, aborting")}else throw A("toString is not a function");if(!Pe.isSupported)return dt;if(ko||$v(le),Pe.removed=[],typeof dt=="string"&&(Od=!1),Od){if(dt.nodeName){const Ca=Sr(dt.nodeName);if(!It[Ca]||ni[Ca])throw A("root node is forbidden and cannot be sanitized in-place")}}else if(dt instanceof Te)Ve=q1("<!---->"),ct=Ve.ownerDocument.importNode(dt,!0),ct.nodeType===_e.element&&ct.nodeName==="BODY"||ct.nodeName==="HTML"?Ve=ct:Ve.appendChild(ct);else{if(!Mn&&!dn&&!mr&&dt.indexOf("<")===-1)return Et&&Hr?Et.createHTML(dt):dt;if(Ve=q1(dt),!Ve)return Mn?null:Hr?Yt:""}Ve&&Zn&&Yo(Ve.firstChild);const lr=H1(Od?dt:Ve);for(;Dn=lr.nextNode();)V1(Dn),Y1(Dn),Dn.content instanceof Ke&&bM(Dn.content);if(Od)return dt;if(Mn){if(qr)for(Kr=gr.call(Ve.ownerDocument);Ve.firstChild;)Kr.appendChild(Ve.firstChild);else Kr=Ve;return(Ht.shadowroot||Ht.shadowrootmode)&&(Kr=Xn.call(Ee,Kr,!0)),Kr}let Ti=mr?Ve.outerHTML:Ve.innerHTML;return mr&&It["!doctype"]&&Ve.ownerDocument&&Ve.ownerDocument.doctype&&Ve.ownerDocument.doctype.name&&$(me,Ve.ownerDocument.doctype.name)&&(Ti="<!DOCTYPE "+Ve.ownerDocument.doctype.name+`>
|
|
139
|
+
`).map(e=>e.startsWith("*.")&&e.includes("filter=lfs")?e.split(" ")[0].slice(2).toLowerCase():"").filter(Boolean)??[]);const Rt=(t=0)=>new Promise(e=>{globalThis.setTimeout(()=>{e(void 0)},t)});var i_,yS;function _U(){if(yS)return i_;yS=1;function t(n){return n>=55296&&n<=56319}function e(n){return n>=56320&&n<=57343}return i_=function(r,i,o){if(typeof i!="string")throw new Error("Input must be string");for(var a=i.length,s=0,l,u,d=0;d<a;d+=1){if(l=i.charCodeAt(d),u=i[d],t(l)&&e(i.charCodeAt(d+1))&&(d+=1,u+=i[d]),s+=r(u),s===o)return i.slice(0,d+1);if(s>o)return i.slice(0,d-u.length+1)}return i},i_}var o_,wS;function bU(){if(wS)return o_;wS=1;function t(n){return n>=55296&&n<=56319}function e(n){return n>=56320&&n<=57343}return o_=function(r){if(typeof r!="string")throw new Error("Input must be string");for(var i=r.length,o=0,a=null,s=null,l=0;l<i;l++)a=r.charCodeAt(l),e(a)?s!=null&&t(s)?o+=1:o+=3:a<=127?o+=1:a>=128&&a<=2047?o+=2:a>=2048&&a<=65535&&(o+=3),s=a;return o},o_}var a_,xS;function yU(){if(xS)return a_;xS=1;var t=_U(),e=bU();return a_=t.bind(null,e),a_}var s_,kS;function wU(){if(kS)return s_;kS=1;var t=yU(),e=/[\/\?<>\\:\*\|"]/g,n=/[\x00-\x1f\x80-\x9f]/g,r=/^\.+$/,i=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,o=/[\. ]+$/;function a(s,l){if(typeof s!="string")throw new Error("Input must be string");var u=s.replace(e,l).replace(n,l).replace(r,l).replace(i,l).replace(o,l);return t(u,255)}return s_=function(s,l){var u=l&&l.replacement||"",d=a(s,u);return u===""?d:a(d,"")},s_}var xU=wU();const kU=ts(xU),NP=(t,e)=>new RegExp(`^${t.split("/").map(e).join("\\/")}\\b`),RP=t=>{const e=t.startsWith("@");return e&&(t=t.slice(1)),t=t.split("/").map(n=>encodeURIComponent(n).replace(/[!'()*]/g,r=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`)).join("/"),e?`@${t}`:t},SU=t=>decodeURIComponent(t),Fm=t=>{const e=new Intl.NumberFormat(oe(Bt),{maximumFractionDigits:1}),n=1e3,r=n*1e3,i=r*1e3,o=i*1e3;return t<n?oe(ce)("file_size_units.b",{values:{size:e.format(t)}}):t<r?oe(ce)("file_size_units.kb",{values:{size:e.format(t/n)}}):t<i?oe(ce)("file_size_units.mb",{values:{size:e.format(t/r)}}):t<o?oe(ce)("file_size_units.gb",{values:{size:e.format(t/i)}}):oe(ce)("file_size_units.tb",{values:{size:e.format(t/o)}})},MP=(t,e)=>{if(!e.length)return t;const{filename:n,extension:r}=pn(t),i=new RegExp(`^${Xt(n)}(?:-(?<num>\\d+?))?${r?`\\.${r}`:""}$`),o=e.sort((s,l)=>eo(s.split(".")[0],l.split(".")[0])).findLast(s=>i.test(s));if(!o)return t;const a=Number(o.match(i)?.groups?.num??0)+1;return`${n}-${a}${r?`.${r}`:""}`},Px=(t,{slugificationEnabled:e=!1,assetNamesInSameFolder:n=[]}={})=>{let r=kU(t.normalize().replace(/[\s\u00A0\u202F]+/g," "));if(e){const{filename:i,extension:o}=pn(r);r=`${tL(i)}${o?`.${o}`:""}`}return MP(r,n)},Au=t=>t.filter(Boolean).join("/"),Zb=t=>{const e=t.split("/");let n=!1;return e.forEach((r,i)=>{if(r==="."||r===".."){if(n&&(e[i]=null,r==="..")){const o=e.findLastIndex((a,s)=>!!a&&s<i);o>-1&&(e[o]=null)}}else n=!0}),Au(e)},Ox=t=>typeof t=="string"?new Blob([t],{type:"text/plain"}):t,Bl=async t=>{const n=await Ox(t).arrayBuffer();return zl(new Blob([`blob ${n.byteLength}\0`,n]))},EU="modulepreload",TU=function(t){return"/"+t},SS={},DP=function(e,n,r){let i=Promise.resolve();if(n&&n.length>0){let l=function(u){return Promise.all(u.map(d=>Promise.resolve(d).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),s=a?.nonce||a?.getAttribute("nonce");i=l(n.map(u=>{if(u=TU(u),u in SS)return;SS[u]=!0;const d=u.endsWith(".css"),f=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${f}`))return;const h=document.createElement("link");if(h.rel=d?"stylesheet":EU,d||(h.as="script"),h.crossOrigin="",h.href=u,s&&h.setAttribute("nonce",s),document.head.appendChild(h),d)return new Promise((p,g)=>{h.addEventListener("load",p),h.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${u}`)))})}))}function o(a){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=a,window.dispatchEvent(s),!s.defaultPrevented)throw a}return i.then(a=>{for(const s of a||[])s.status==="rejected"&&o(s.reason);return e().catch(o)})},Qb="0.123.0",$U={"@jsquash/webp":"^1.5.0","@lexical/markdown":"^0.38.2","@sindresorhus/transliterate":"^2.2.0","@sveltia/ui":"^0.31.9","@sveltia/utils":"^0.8.6","create-react-class":"^15.7.0",dayjs:"^1.11.19",deepmerge:"^4.3.1",exifr:"^7.1.3","fast-deep-equal":"^3.1.3",flat:"^6.0.1",immutable:"^5.1.4","isomorphic-dompurify":"^2.33.0",leaflet:"^1.9.4",lexical:"^0.38.2",marked:"^17.0.1","marked-bidi":"^1.0.14",mime:"^4.1.0","parse-entities":"^4.0.2","pdfjs-dist":"^5.4.449",qrcode:"^1.5.4",react:"^19.2.1","react-dom":"^19.2.1","sanitize-filename":"^1.6.3","smol-toml":"^1.5.2","svelte-i18n":"^4.0.1",svgo:"^4.0.0","terra-draw":"^1.20.0","terra-draw-leaflet-adapter":"1.0.3",turndown:"^7.2.2",yaml:"^2.8.2"},Lx=t=>{const e=`https://unpkg.com/${t}`,n=$U[t]?.replace(/^\D/,"");return n?`${e}@${n}`:e},Cu=async(t,e)=>DP(()=>import(`${Lx(t)}/${e}`),[]),dl=(t,e)=>{if(typeof t!="number")return NaN;if(!Number.isFinite(t))return t;const n=10**e;return Math.round(t*n)/n},AU=async(t,e)=>{const r=e==="image"?await ss(t):null;if(!r)return{createdDate:void 0,coordinates:void 0};const{parse:i}=await Cu("exifr","dist/lite.esm.mjs"),{latitude:o,longitude:a,DateTimeOriginal:s,CreateDate:l=s}=await i(r).catch(()=>{})??{};return{createdDate:l instanceof Date?l:void 0,coordinates:Number.isFinite(o)&&Number.isFinite(a)?{latitude:dl(o,7),longitude:dl(a,7)}:void 0}},CU=t=>{const e=new Image;return new Promise(n=>{const r=()=>{n({dimensions:{width:e.naturalWidth,height:e.naturalHeight}})};e.addEventListener("load",r,{once:!0}),e.src=t})},PU=async(t,e)=>{const n=document.createElement(e);return new Promise(r=>{const i=()=>{const{duration:o}=n;e==="audio"&&r({duration:o});const{videoWidth:a,videoHeight:s}=n;r({dimensions:{width:a,height:s},duration:o})};n.addEventListener("loadedmetadata",i,{once:!0}),n.src=t})},OU=async(t,e)=>e==="image"?CU(t):PU(t,e),LU=async(t,e,n)=>{const{dimensions:r,duration:i}=await OU(e,n),{createdDate:o,coordinates:a}=await AU(t,n);return{dimensions:r,duration:i,createdDate:o,coordinates:a}},FP=["avif","gif","jpeg","png","webp"],IU=FP.map(t=>`image/${t}`),ey=/\b(?:avif|gif|jpe?g|png|webp)$/i,NU=["image/svg+xml"],RU=/\b(?:svg)$/i,sa=[...IU,...NU],zP=["webp"],l_={},MU=async t=>{if(t in l_)return l_[t];const e=`image/${t}`,n=new OffscreenCanvas(1,1);n.getContext("2d");const i=(await n.convertToBlob({type:e})).type===e;return l_[t]=i,i},jP=async(t,{format:e="webp",quality:n=85}={})=>{const r=`image/${e}`;if(!await MU(e)&&zP.includes(e)){const o=t.getContext("2d").getImageData(0,0,t.width,t.height);try{const a=(await Cu(`@jsquash/${e}`,"encode.js?module")).default,s=await a(o,{quality:n});return new Blob([s],{type:r})}catch{}}return t.convertToBlob({type:r,quality:n/100})},DU=({width:t,height:e},{width:n=t,height:r=e,fit:i="scale-down"}={})=>{const o={scale:1,width:t,height:e};if(t===r&&e===r)return o;const a=t>e,s=t<r||e<r;let l=1,u=0,d=0;if(i==="scale-down"){if(s)return o;i="contain"}return i==="contain"&&(a?(n>r?(l=n/t,u=n):(l=r/t,u=r),d=e*l):(n>r?(l=r/e,d=r):(l=n/e,d=n),u=t*l)),{scale:l,width:u,height:d}},UP=(t,e,n)=>{const{scale:r,width:i,height:o}=DU(e,n);return t.width=i,t.height=o,{scale:r,width:i,height:o}},FU=async({blob:t})=>{const e=URL.createObjectURL(t),n=new Image;return new Promise(r=>{n.addEventListener("load",()=>{r({source:n,naturalWidth:n.naturalWidth,naturalHeight:n.naturalHeight}),URL.revokeObjectURL(e)},{once:!0}),n.src=e})},zU=async({blob:t})=>{const e=URL.createObjectURL(t),n=document.createElement("video");return new Promise(r=>{n.addEventListener("canplay",()=>{n.pause(),r({source:n,naturalWidth:n.videoWidth,naturalHeight:n.videoHeight}),URL.revokeObjectURL(e)},{once:!0}),n.muted=!0,n.autoplay=!0,n.playsInline=!0,n.src=e,n.style.opacity="0",n.style.pointerEvents="none",document.body.appendChild(n)})},jU=async t=>t.type.startsWith("video/")?zU({blob:t}):FU({blob:t}),Ix=async(t,{format:e="png",quality:n=85,width:r=void 0,height:i=void 0,fit:o="scale-down"}={})=>{let a,s=0,l=0;try{a=await createImageBitmap(t),{width:s,height:l}=a}catch{({source:a,naturalWidth:s,naturalHeight:l}=await jU(t))}r??=s,i??=l;const u=new OffscreenCanvas(512,512),d=u.getContext("2d");return UP(u,{width:s,height:l},{fit:o,width:r,height:i}),d.drawImage(a,0,0,u.width,u.height),a instanceof HTMLVideoElement&&document.body.removeChild(a),jP(u,{format:e,quality:n})},UU=async t=>{const e=await t.text();try{const{optimize:n}=await Cu("svgo","dist/svgo.browser.js"),{data:r}=n(e);return new Blob([r],{type:t.type})}catch{}return t},Zc=Lx("pdfjs-dist"),BU=`${Zc}/build/pdf.min.mjs`,qU=`${Zc}/build/pdf.worker.min.mjs`,HU={isEvalSupported:!1,disableAutoFetch:!0,cMapUrl:`${Zc}/cmaps/`,iccUrl:`${Zc}/iccs/`,standardFontDataUrl:`${Zc}/standard_fonts/`,wasmUrl:`${Zc}/wasm/`};let yp;const KU=async(t,{format:e="png",quality:n=85,width:r=void 0,height:i=void 0,fit:o="scale-down"}={})=>{if(!yp)try{yp=await import(BU),yp.GlobalWorkerOptions.workerSrc=qU}catch{throw new Error("Failed to load PDF.js library")}const a=URL.createObjectURL(t),s=new OffscreenCanvas(512,512),l=s.getContext("2d");try{const d=await(await yp.getDocument({...HU,url:a}).promise).getPage(1),f=d.getViewport({scale:1}),{scale:h}=UP(s,{width:f.width,height:f.height},{width:r,height:i,fit:o});await d.render({canvasContext:l,viewport:h===1?f:d.getViewport({scale:h})}).promise,URL.revokeObjectURL(a)}catch{throw new Error("Failed to render PDF")}return jP(s,{format:e,quality:n})},c_=new Set,ss=async(t,e=0)=>{const{file:n,handle:r,blobURL:i,name:o,path:a}=t;if(i)return fetch(i).then(l=>l.blob());let s;if(n)s=n;else if(r)try{s=await r.getFile()}catch{throw new Error("Failed to retrieve blob from file handle")}else{if(c_.has(a)&&e<=25)return await Rt(200),ss(t,e+1);c_.add(a);const l=await oe(Cn)?.fetchBlob?.(t);if(!l)throw new Error("Failed to retrieve blob");s=new Blob([l],{type:as.getType(o)??l.type})}return t.blobURL=URL.createObjectURL(s),c_.delete(a),s},Nx=async t=>(t.blobURL||await ss(t),t.blobURL);let wp;const ty=async(t,{cacheOnly:e=!1}={})=>{const n=t.name.endsWith(".pdf");if(!(["image","video"].includes(t.kind)||n))return;if(wp===void 0){const{databaseName:i}=oe(Cn)?.repository??{};wp=i?new jo(i,"asset-thumbnails"):null}let r=await wp?.get(t.sha);if(!r){if(e)return;const i=await ss(t),o={format:"webp",quality:85,width:512,height:512,fit:"contain"};r=n?await KU(i,o):await Ix(i,o),await wp?.set(t.sha,r)}return URL.createObjectURL(r)},Wf=(t,{pathOnly:e=!1,allowSpecial:n=!1,entry:r=void 0}={})=>{const{publicPath:i,entryRelative:o,hasTemplateTags:a}=t.folder.collectionName===void 0?t.folder:Em(t.path).find(({collectionName:d})=>d!==void 0)??oe(ed);if(o)return e&&r&&pn(t.path).dirname===pn(Object.values(r.locales)[0].path).dirname?t.name:void 0;const{_baseURL:s="",output:{encode_file_path:l=!1}={}}=oe(Pt);let u=a?t.path.replace(NP(t.folder.internalPath??"",d=>{const f=d.match(/{{(?<tag>.+?)}}/)?.groups?.tag;return f?`(?<${f}>[^/]+)`:Xt(d)}),i?.replaceAll(/{{(.+?)}}/g,"$<$1>")??""):t.path.replace(t.folder.internalPath??"",i==="/"?"":i??"");if(l&&(u=RP(u)),!(!u.startsWith("/")&&!n))return e?u:`${s}${u}`},ql=async({value:t,entry:e,collectionName:n,fileName:r,thumbnail:i=!1})=>{if(!t)return;if(/^(?:https?|data|blob):/.test(t))return t;const o=m0({value:t,entry:e,collectionName:n,fileName:r});if(o)return(i?await ty(o):await Nx(o))??Wf(o)},wg={publicURL:void 0,repoBlobURL:void 0,dimensions:void 0,duration:void 0,usedEntries:[]},zm=async t=>{const{kind:e,path:n}=t,{blobBaseURL:r}=oe(Cn)?.repository??{},i=await Nx(t),o=Wf(t,{allowSpecial:!0,pathOnly:!0})??i;let a={};return["image","video","audio"].includes(e)&&i&&(a=await LU(t,i,e)),{...a,publicURL:Wf(t),repoBlobURL:r?`${r}/${n}`:void 0,usedEntries:o?await sy(o):[]}},jr=t=>{let e;if(t!=="_default")try{[e]=Intl.getCanonicalLocales(t)}catch{}return e},Uo=(t,{displayLocale:e=jr(oe(Bt)??"en")}={})=>{const n=jr(t);if(!n)return;const r=new Intl.DisplayNames(e,{type:"language"});try{return r.of(n)}catch(i){console.error(i);return}},Hl=(t,e={})=>new Intl.ListFormat(jr(t),{style:"narrow",type:"conjunction",...e}),Rx=({_i18n:t,locale:e,path:n})=>{const{defaultLocale:r,omitDefaultLocaleFromFileName:i}=t;return i&&e===r&&(n=n.replace(/\.{{locale}}\.(\w+)$/,".$1")),n.replaceAll("{{locale}}",e)},VU=/^(?:\d{4}-[01]\d-[0-3]\d)?(?:T?[0-2]\d:[0-5]\d)?(?::[0-5]\d)?(?:\.\d+)?(?:[+-][0-2]\d:[0-5]\d|Z)?$/,GU=/^\d{4}-[01]\d-[0-3]\d$/,WU=/T00:00(?::00)?(?:\.000)?Z$/,ny={year:"numeric",month:"short",day:"numeric"},ry={hour:"numeric",minute:"numeric",hour12:!0},YU={...ny,...ry};wr.extend(Tx);wr.extend($x);wr.extend(Ax);const Js=t=>{const{format:e,date_format:n=void 0,time_format:r=void 0,picker_utc:i=!1}=t;return{format:e||[typeof n=="string"?n:"",typeof r=="string"?r:""].join(" ").trim()||void 0,dateOnly:r===!1,timeOnly:n===!1,utc:i}},Pu=(t,e)=>{const{format:n,timeOnly:r,utc:i}=Js(e);if(t)try{return n?(i?wr.utc:wr)(t,n).toDate():r?new Date(`${new Date().toJSON().split("T")[0]}T${t}`):new Date(t)}catch(o){console.error(o);return}},BP=t=>{const{dateOnly:e,timeOnly:n,utc:r}=Js(t),{year:i,month:o,day:a,hour:s,minute:l}=jl({timeZone:r?"UTC":void 0}),u=`${i}-${o}-${a}`,d=`${s}:${l}`;return e?u:n?d:r?`${u}T${d}:00.000Z`:`${u}T${d}`},qP=(t,e,n)=>{const{format:r,dateOnly:i,timeOnly:o,utc:a}=Js(n),s=i?"YYYY-MM-DD":o?"HH:mm":"YYYY-MM-DDTHH:mm",l=`:00${e?.endsWith(".000")?".000":""}`;if(t==="")return"";if(t)try{if(r){const u=(a?wr.utc:wr)(t,s).format(r);return r.includes("Z")&&u.endsWith("+00:00")?u.replace("+00:00","Z"):u}return i?t:a?`${t}:00.000Z`:`${t}${l}`}catch(u){console.error(u);return}},JU=(t,e)=>{const{dateOnly:n,timeOnly:r,utc:i}=Js(e);if(!t)return"";const o=n?t?.match(/^(?<date>\d{4}-[01]\d-[0-3]\d)\b/)?.groups?.date:r?t?.match(/(?:^|T)(?<time>[0-2]\d:[0-5]\d)\b/)?.groups?.time:void 0;if(o)return o;try{const a=t?Pu(t,e):new Date;if(t&&!a||t&&a&&Number.isNaN(a.getTime()))return"";const{year:s,month:l,day:u,hour:d,minute:f}=jl({date:a,timeZone:i?"UTC":void 0}),h=`${s}-${l}-${u}`,p=`${d}:${f}`;return n?h:r?p:`${h}T${p}`}catch(a){return console.error(a),""}},HP=({locale:t,fieldConfig:e,currentValue:n})=>{const{format:r,dateOnly:i,timeOnly:o,utc:a}=Js(e);if(typeof n!="string"||!n.trim())return"";if(r)try{return(a?wr.utc:wr)(n,r).format(r)}catch{}const s=Pu(n,e),l=jr(t);return!s||Number.isNaN(s.getTime())?"":o?s.toLocaleTimeString(l,ry):i?s.toLocaleDateString(l,{...ny,timeZone:a||GU.test(n)||WU.test(n)?"UTC":void 0}):s.toLocaleString(l,{...ny,...ry,timeZone:a?"UTC":void 0,timeZoneName:a?void 0:"short"})};wr.extend(Tx);wr.extend($x);wr.extend(Ax);const Mx=/^date\('(?<format>.+?)'(?:,\s*'(?<timeZone>.+?)')?\)$/,KP=/^default\('(?<defaultValue>.+?)'\)$/,VP=/^ternary\('(?<truthyValue>.*?)',\s*'(?<falsyValue>.*?)'\)$/,XU=/^truncate\((?<max>\d+)(?:,\s*'(?<ellipsis>.+?)')?\)$/,ZU=t=>String(t).toUpperCase(),QU=t=>String(t).toLowerCase(),eB=(t,{format:e,timeZone:n},r)=>{const i=String(t),{dateOnly:o,utc:a}=Js(r),l=(n==="utc"||a||o&&!!i.match(/^\d{4}-[01]\d-[0-3]\d$/)||o&&!!i.match(/T\d{2}:\d{2}(?::\d{2})?(?:\.\d+)?Z$/)?wr.utc:wr)(i);return l.isValid()?l.format(e):""},tB=(t,{defaultValue:e})=>t?String(t):e,nB=(t,{truthyValue:e,falsyValue:n})=>t?e:n,rB=(t,{max:e,ellipsis:n="…"})=>_2(String(t),Number(e),{ellipsis:n}),iB=({fieldConfig:t,value:e,transformation:n})=>{if(n==="upper")return ZU(e);if(n==="lower")return QU(e);const r=n.match(Mx);if(r?.groups)return eB(e,r.groups,t??{});const i=n.match(KP);if(i?.groups)return tB(e,i.groups);const o=n.match(VP);if(o?.groups)return nB(e,o.groups);const a=n.match(XU);return a?.groups?rB(e,a.groups):String(e)},Dx=({fieldConfig:t,value:e,transformations:n})=>(n.forEach(r=>{e=iB({fieldConfig:t,value:e,transformation:r})}),e),Fx=["file","image"],jm=[...Fx,"relation","select"],GP=[...jm,"list","number"],WP=({multiline:t,dotAll:e,source:n})=>t||e||n.includes("[\\s\\S]")||n.includes("[\\S\\s]"),YP=t=>zo(Object.fromEntries(Object.entries(Pi(t)).filter(([e])=>!e.split(".").pop()?.startsWith("__sc_")))),JP=t=>t.replace(/"/g,"'"),ml=t=>t.replace(/"/g,"""),zx=/!\[(?<alt>(?:[^\]\\]|\\.)*)\]\((?<src>(?:[^"()\\]|\\.|\([^)]*\)|"[^"]*")*?)(?:\s+"(?<title>(?:[^"\\]|\\.)*)")?\)/,oB=new RegExp(zx,"g"),aB=/\[!\[(?<alt2>(?:[^\]\\]|\\.)*)\]\((?<src2>(?:[^"()\\]|\\.|\([^)]*\)|"[^"]*")*?)(?:\s+"(?<title2>(?:[^"\\]|\\.)*)")?\)\](?:\((?<link>[^)]*\([^)]*\)[^)]*|[^)]*)\))/,sB=new RegExp(`${zx.source}|${aB.source}`),xg=new Map,XP={id:"image",label:"Image",fields:[{name:"src",label:"Source",widget:"image"},{name:"alt",label:"Alt Text",required:!1},{name:"title",label:"Title",required:!1}],pattern:zx,toBlock:t=>{const{src:e="",alt:n="",title:r=""}=t;return e?`}"`:""})`:""},toPreview:t=>{const{src:e="",alt:n="",title:r=""}=t;return`<img src="${ml(e)}" alt="${ml(n)}" title="${ml(r)}">`}},lB={id:"linked-image",label:"Image",fields:[...XP.fields,{name:"link",label:"Link",required:!1}],pattern:sB,fromBlock:t=>{const{src:e,alt:n,title:r,src2:i,alt2:o,title2:a,link:s}=t.groups??{};return{src:(e||i||"").trim(),alt:(n||o||"").trim(),title:(r||a||"").trim(),link:(s||"").trim()}},toBlock:t=>{const{src:e="",alt:n="",title:r="",link:i=""}=t,o=e?`}"`:""})`:"";return o&&i?`[${o}](${i})`:o},toPreview:t=>{const{src:e="",alt:n="",title:r="",link:i=""}=t,o=`<img src="${ml(e)}" alt="${ml(n)}" title="${ml(r)}">`;return i?`<a href="${ml(i)}">${o}</a>`:o}},ZP=t=>{if(xg.has(t))return xg.get(t);const e={icon:"image",label:oe(ce)("editor_components.image"),fields:[{name:"src",label:oe(ce)("editor_components.src"),widget:"image"},{name:"alt",label:oe(ce)("editor_components.alt"),required:!1},{name:"title",label:oe(ce)("editor_components.title"),required:!1}]};return{image:{...XP,...e},"linked-image":{...lB,...e,fields:[...e.fields,{name:"link",label:oe(ce)("editor_components.link"),required:!1}]}}[t]};var u_,ES;function TS(){if(ES)return u_;ES=1;const{entries:t,setPrototypeOf:e,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:i}=Object;let{freeze:o,seal:a,create:s}=Object,{apply:l,construct:u}=typeof Reflect<"u"&&Reflect;o||(o=function(Pe){return Pe}),a||(a=function(Pe){return Pe}),l||(l=function(Pe,$e){for(var Ee=arguments.length,qe=new Array(Ee>2?Ee-2:0),Ke=2;Ke<Ee;Ke++)qe[Ke-2]=arguments[Ke];return Pe.apply($e,qe)}),u||(u=function(Pe){for(var $e=arguments.length,Ee=new Array($e>1?$e-1:0),qe=1;qe<$e;qe++)Ee[qe-1]=arguments[qe];return new Pe(...Ee)});const d=k(Array.prototype.forEach),f=k(Array.prototype.lastIndexOf),h=k(Array.prototype.pop),p=k(Array.prototype.push),g=k(Array.prototype.splice),m=k(String.prototype.toLowerCase),v=k(String.prototype.toString),b=k(String.prototype.match),y=k(String.prototype.replace),w=k(String.prototype.indexOf),x=k(String.prototype.trim),E=k(Object.prototype.hasOwnProperty),$=k(RegExp.prototype.test),A=T(TypeError);function k(Ie){return function(Pe){Pe instanceof RegExp&&(Pe.lastIndex=0);for(var $e=arguments.length,Ee=new Array($e>1?$e-1:0),qe=1;qe<$e;qe++)Ee[qe-1]=arguments[qe];return l(Ie,Pe,Ee)}}function T(Ie){return function(){for(var Pe=arguments.length,$e=new Array(Pe),Ee=0;Ee<Pe;Ee++)$e[Ee]=arguments[Ee];return u(Ie,$e)}}function C(Ie,Pe){let $e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:m;e&&e(Ie,null);let Ee=Pe.length;for(;Ee--;){let qe=Pe[Ee];if(typeof qe=="string"){const Ke=$e(qe);Ke!==qe&&(n(Pe)||(Pe[Ee]=Ke),qe=Ke)}Ie[qe]=!0}return Ie}function P(Ie){for(let Pe=0;Pe<Ie.length;Pe++)E(Ie,Pe)||(Ie[Pe]=null);return Ie}function O(Ie){const Pe=s(null);for(const[$e,Ee]of t(Ie))E(Ie,$e)&&(Array.isArray(Ee)?Pe[$e]=P(Ee):Ee&&typeof Ee=="object"&&Ee.constructor===Object?Pe[$e]=O(Ee):Pe[$e]=Ee);return Pe}function I(Ie,Pe){for(;Ie!==null;){const Ee=i(Ie,Pe);if(Ee){if(Ee.get)return k(Ee.get);if(typeof Ee.value=="function")return k(Ee.value)}Ie=r(Ie)}function $e(){return null}return $e}const L=o(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),D=o(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),B=o(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),K=o(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),G=o(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),W=o(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Y=o(["#text"]),R=o(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),q=o(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),J=o(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Q=o(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ee=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),re=a(/<%[\w\W]*|[\w\W]*%>/gm),te=a(/\$\{[\w\W]*/gm),de=a(/^data-[\-\w.\u00B7-\uFFFF]+$/),he=a(/^aria-[\-\w]+$/),ue=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ge=a(/^(?:\w+script|data):/i),ye=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),me=a(/^html$/i),Ae=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var Ce=Object.freeze({__proto__:null,ARIA_ATTR:he,ATTR_WHITESPACE:ye,CUSTOM_ELEMENT:Ae,DATA_ATTR:de,DOCTYPE_NAME:me,ERB_EXPR:re,IS_ALLOWED_URI:ue,IS_SCRIPT_OR_DATA:ge,MUSTACHE_EXPR:ee,TMPLIT_EXPR:te});const _e={element:1,text:3,progressingInstruction:7,comment:8,document:9},fe=function(){return typeof window>"u"?null:window},be=function(Pe,$e){if(typeof Pe!="object"||typeof Pe.createPolicy!="function")return null;let Ee=null;const qe="data-tt-policy-suffix";$e&&$e.hasAttribute(qe)&&(Ee=$e.getAttribute(qe));const Ke="dompurify"+(Ee?"#"+Ee:"");try{return Pe.createPolicy(Ke,{createHTML(lt){return lt},createScriptURL(lt){return lt}})}catch{return console.warn("TrustedTypes policy "+Ke+" could not be created."),null}},Oe=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function je(){let Ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:fe();const Pe=dt=>je(dt);if(Pe.version="3.3.0",Pe.removed=[],!Ie||!Ie.document||Ie.document.nodeType!==_e.document||!Ie.Element)return Pe.isSupported=!1,Pe;let{document:$e}=Ie;const Ee=$e,qe=Ee.currentScript,{DocumentFragment:Ke,HTMLTemplateElement:lt,Node:Te,Element:Me,NodeFilter:pe,NamedNodeMap:Le=Ie.NamedNodeMap||Ie.MozNamedAttrMap,HTMLFormElement:Ne,DOMParser:nt,trustedTypes:We}=Ie,Ze=Me.prototype,st=I(Ze,"cloneNode"),_t=I(Ze,"remove"),Ft=I(Ze,"nextSibling"),ln=I(Ze,"childNodes"),qt=I(Ze,"parentNode");if(typeof lt=="function"){const dt=$e.createElement("template");dt.content&&dt.content.ownerDocument&&($e=dt.content.ownerDocument)}let Et,Yt="";const{implementation:wt,createNodeIterator:Lt,createDocumentFragment:gr,getElementsByTagName:vn}=$e,{importNode:Xn}=Ee;let kt=Oe();Pe.isSupported=typeof t=="function"&&typeof qt=="function"&&wt&&wt.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:cn,ERB_EXPR:ut,TMPLIT_EXPR:pt,DATA_ATTR:_n,ARIA_ATTR:Rn,IS_SCRIPT_OR_DATA:Pn,ATTR_WHITESPACE:bn,CUSTOM_ELEMENT:un}=Ce;let{IS_ALLOWED_URI:yn}=Ce,It=null;const kr=C({},[...L,...D,...B,...G,...Y]);let Ht=null;const Si=C({},[...R,...q,...J,...Q]);let Tt=Object.seal(s(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ni=null,Fi=null;const oo=Object.seal(s(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ds=!0,On=!0,ft=!1,Ct=!0,dn=!1,sr=!0,mr=!1,ko=!1,Zn=!1,Mn=!1,qr=!1,Hr=!1,Ei=!0,Gn=!1;const Or="user-content-";let ri=!0,Od=!1,Ac={},Cc=null;const M1=C({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let D1=null;const F1=C({},["audio","video","img","source","image","track"]);let Sv=null;const z1=C({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),op="http://www.w3.org/1998/Math/MathML",ap="http://www.w3.org/2000/svg",$a="http://www.w3.org/1999/xhtml";let Pc=$a,Ev=!1,Tv=null;const hM=C({},[op,ap,$a],v);let sp=C({},["mi","mo","mn","ms","mtext"]),lp=C({},["annotation-xml"]);const pM=C({},["title","style","font","a","script"]);let Ld=null;const gM=["application/xhtml+xml","text/html"],mM="text/html";let Sr=null,Oc=null;const vM=$e.createElement("form"),j1=function(le){return le instanceof RegExp||le instanceof Function},$v=function(){let le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Oc&&Oc===le)){if((!le||typeof le!="object")&&(le={}),le=O(le),Ld=gM.indexOf(le.PARSER_MEDIA_TYPE)===-1?mM:le.PARSER_MEDIA_TYPE,Sr=Ld==="application/xhtml+xml"?v:m,It=E(le,"ALLOWED_TAGS")?C({},le.ALLOWED_TAGS,Sr):kr,Ht=E(le,"ALLOWED_ATTR")?C({},le.ALLOWED_ATTR,Sr):Si,Tv=E(le,"ALLOWED_NAMESPACES")?C({},le.ALLOWED_NAMESPACES,v):hM,Sv=E(le,"ADD_URI_SAFE_ATTR")?C(O(z1),le.ADD_URI_SAFE_ATTR,Sr):z1,D1=E(le,"ADD_DATA_URI_TAGS")?C(O(F1),le.ADD_DATA_URI_TAGS,Sr):F1,Cc=E(le,"FORBID_CONTENTS")?C({},le.FORBID_CONTENTS,Sr):M1,ni=E(le,"FORBID_TAGS")?C({},le.FORBID_TAGS,Sr):O({}),Fi=E(le,"FORBID_ATTR")?C({},le.FORBID_ATTR,Sr):O({}),Ac=E(le,"USE_PROFILES")?le.USE_PROFILES:!1,ds=le.ALLOW_ARIA_ATTR!==!1,On=le.ALLOW_DATA_ATTR!==!1,ft=le.ALLOW_UNKNOWN_PROTOCOLS||!1,Ct=le.ALLOW_SELF_CLOSE_IN_ATTR!==!1,dn=le.SAFE_FOR_TEMPLATES||!1,sr=le.SAFE_FOR_XML!==!1,mr=le.WHOLE_DOCUMENT||!1,Mn=le.RETURN_DOM||!1,qr=le.RETURN_DOM_FRAGMENT||!1,Hr=le.RETURN_TRUSTED_TYPE||!1,Zn=le.FORCE_BODY||!1,Ei=le.SANITIZE_DOM!==!1,Gn=le.SANITIZE_NAMED_PROPS||!1,ri=le.KEEP_CONTENT!==!1,Od=le.IN_PLACE||!1,yn=le.ALLOWED_URI_REGEXP||ue,Pc=le.NAMESPACE||$a,sp=le.MATHML_TEXT_INTEGRATION_POINTS||sp,lp=le.HTML_INTEGRATION_POINTS||lp,Tt=le.CUSTOM_ELEMENT_HANDLING||{},le.CUSTOM_ELEMENT_HANDLING&&j1(le.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Tt.tagNameCheck=le.CUSTOM_ELEMENT_HANDLING.tagNameCheck),le.CUSTOM_ELEMENT_HANDLING&&j1(le.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Tt.attributeNameCheck=le.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),le.CUSTOM_ELEMENT_HANDLING&&typeof le.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Tt.allowCustomizedBuiltInElements=le.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),dn&&(On=!1),qr&&(Mn=!0),Ac&&(It=C({},Y),Ht=[],Ac.html===!0&&(C(It,L),C(Ht,R)),Ac.svg===!0&&(C(It,D),C(Ht,q),C(Ht,Q)),Ac.svgFilters===!0&&(C(It,B),C(Ht,q),C(Ht,Q)),Ac.mathMl===!0&&(C(It,G),C(Ht,J),C(Ht,Q))),le.ADD_TAGS&&(typeof le.ADD_TAGS=="function"?oo.tagCheck=le.ADD_TAGS:(It===kr&&(It=O(It)),C(It,le.ADD_TAGS,Sr))),le.ADD_ATTR&&(typeof le.ADD_ATTR=="function"?oo.attributeCheck=le.ADD_ATTR:(Ht===Si&&(Ht=O(Ht)),C(Ht,le.ADD_ATTR,Sr))),le.ADD_URI_SAFE_ATTR&&C(Sv,le.ADD_URI_SAFE_ATTR,Sr),le.FORBID_CONTENTS&&(Cc===M1&&(Cc=O(Cc)),C(Cc,le.FORBID_CONTENTS,Sr)),ri&&(It["#text"]=!0),mr&&C(It,["html","head","body"]),It.table&&(C(It,["tbody"]),delete ni.tbody),le.TRUSTED_TYPES_POLICY){if(typeof le.TRUSTED_TYPES_POLICY.createHTML!="function")throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof le.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Et=le.TRUSTED_TYPES_POLICY,Yt=Et.createHTML("")}else Et===void 0&&(Et=be(We,qe)),Et!==null&&typeof Yt=="string"&&(Yt=Et.createHTML(""));o&&o(le),Oc=le}},U1=C({},[...D,...B,...K]),B1=C({},[...G,...W]),_M=function(le){let Ve=qt(le);(!Ve||!Ve.tagName)&&(Ve={namespaceURI:Pc,tagName:"template"});const ct=m(le.tagName),Dn=m(Ve.tagName);return Tv[le.namespaceURI]?le.namespaceURI===ap?Ve.namespaceURI===$a?ct==="svg":Ve.namespaceURI===op?ct==="svg"&&(Dn==="annotation-xml"||sp[Dn]):!!U1[ct]:le.namespaceURI===op?Ve.namespaceURI===$a?ct==="math":Ve.namespaceURI===ap?ct==="math"&&lp[Dn]:!!B1[ct]:le.namespaceURI===$a?Ve.namespaceURI===ap&&!lp[Dn]||Ve.namespaceURI===op&&!sp[Dn]?!1:!B1[ct]&&(pM[ct]||!U1[ct]):!!(Ld==="application/xhtml+xml"&&Tv[le.namespaceURI]):!1},Yo=function(le){p(Pe.removed,{element:le});try{qt(le).removeChild(le)}catch{_t(le)}},il=function(le,Ve){try{p(Pe.removed,{attribute:Ve.getAttributeNode(le),from:Ve})}catch{p(Pe.removed,{attribute:null,from:Ve})}if(Ve.removeAttribute(le),le==="is")if(Mn||qr)try{Yo(Ve)}catch{}else try{Ve.setAttribute(le,"")}catch{}},q1=function(le){let Ve=null,ct=null;if(Zn)le="<remove></remove>"+le;else{const lr=b(le,/^[\r\n\t ]+/);ct=lr&&lr[0]}Ld==="application/xhtml+xml"&&Pc===$a&&(le='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+le+"</body></html>");const Dn=Et?Et.createHTML(le):le;if(Pc===$a)try{Ve=new nt().parseFromString(Dn,Ld)}catch{}if(!Ve||!Ve.documentElement){Ve=wt.createDocument(Pc,"template",null);try{Ve.documentElement.innerHTML=Ev?Yt:Dn}catch{}}const Kr=Ve.body||Ve.documentElement;return le&&ct&&Kr.insertBefore($e.createTextNode(ct),Kr.childNodes[0]||null),Pc===$a?vn.call(Ve,mr?"html":"body")[0]:mr?Ve.documentElement:Kr},H1=function(le){return Lt.call(le.ownerDocument||le,le,pe.SHOW_ELEMENT|pe.SHOW_COMMENT|pe.SHOW_TEXT|pe.SHOW_PROCESSING_INSTRUCTION|pe.SHOW_CDATA_SECTION,null)},Av=function(le){return le instanceof Ne&&(typeof le.nodeName!="string"||typeof le.textContent!="string"||typeof le.removeChild!="function"||!(le.attributes instanceof Le)||typeof le.removeAttribute!="function"||typeof le.setAttribute!="function"||typeof le.namespaceURI!="string"||typeof le.insertBefore!="function"||typeof le.hasChildNodes!="function")},K1=function(le){return typeof Te=="function"&&le instanceof Te};function Aa(dt,le,Ve){d(dt,ct=>{ct.call(Pe,le,Ve,Oc)})}const V1=function(le){let Ve=null;if(Aa(kt.beforeSanitizeElements,le,null),Av(le))return Yo(le),!0;const ct=Sr(le.nodeName);if(Aa(kt.uponSanitizeElement,le,{tagName:ct,allowedTags:It}),sr&&le.hasChildNodes()&&!K1(le.firstElementChild)&&$(/<[/\w!]/g,le.innerHTML)&&$(/<[/\w!]/g,le.textContent)||le.nodeType===_e.progressingInstruction||sr&&le.nodeType===_e.comment&&$(/<[/\w]/g,le.data))return Yo(le),!0;if(!(oo.tagCheck instanceof Function&&oo.tagCheck(ct))&&(!It[ct]||ni[ct])){if(!ni[ct]&&W1(ct)&&(Tt.tagNameCheck instanceof RegExp&&$(Tt.tagNameCheck,ct)||Tt.tagNameCheck instanceof Function&&Tt.tagNameCheck(ct)))return!1;if(ri&&!Cc[ct]){const Dn=qt(le)||le.parentNode,Kr=ln(le)||le.childNodes;if(Kr&&Dn){const lr=Kr.length;for(let Ti=lr-1;Ti>=0;--Ti){const Ca=st(Kr[Ti],!0);Ca.__removalCount=(le.__removalCount||0)+1,Dn.insertBefore(Ca,Ft(le))}}}return Yo(le),!0}return le instanceof Me&&!_M(le)||(ct==="noscript"||ct==="noembed"||ct==="noframes")&&$(/<\/no(script|embed|frames)/i,le.innerHTML)?(Yo(le),!0):(dn&&le.nodeType===_e.text&&(Ve=le.textContent,d([cn,ut,pt],Dn=>{Ve=y(Ve,Dn," ")}),le.textContent!==Ve&&(p(Pe.removed,{element:le.cloneNode()}),le.textContent=Ve)),Aa(kt.afterSanitizeElements,le,null),!1)},G1=function(le,Ve,ct){if(Ei&&(Ve==="id"||Ve==="name")&&(ct in $e||ct in vM))return!1;if(!(On&&!Fi[Ve]&&$(_n,Ve))){if(!(ds&&$(Rn,Ve))){if(!(oo.attributeCheck instanceof Function&&oo.attributeCheck(Ve,le))){if(!Ht[Ve]||Fi[Ve]){if(!(W1(le)&&(Tt.tagNameCheck instanceof RegExp&&$(Tt.tagNameCheck,le)||Tt.tagNameCheck instanceof Function&&Tt.tagNameCheck(le))&&(Tt.attributeNameCheck instanceof RegExp&&$(Tt.attributeNameCheck,Ve)||Tt.attributeNameCheck instanceof Function&&Tt.attributeNameCheck(Ve,le))||Ve==="is"&&Tt.allowCustomizedBuiltInElements&&(Tt.tagNameCheck instanceof RegExp&&$(Tt.tagNameCheck,ct)||Tt.tagNameCheck instanceof Function&&Tt.tagNameCheck(ct))))return!1}else if(!Sv[Ve]){if(!$(yn,y(ct,bn,""))){if(!((Ve==="src"||Ve==="xlink:href"||Ve==="href")&&le!=="script"&&w(ct,"data:")===0&&D1[le])){if(!(ft&&!$(Pn,y(ct,bn,"")))){if(ct)return!1}}}}}}}return!0},W1=function(le){return le!=="annotation-xml"&&b(le,un)},Y1=function(le){Aa(kt.beforeSanitizeAttributes,le,null);const{attributes:Ve}=le;if(!Ve||Av(le))return;const ct={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ht,forceKeepAttr:void 0};let Dn=Ve.length;for(;Dn--;){const Kr=Ve[Dn],{name:lr,namespaceURI:Ti,value:Ca}=Kr,Lc=Sr(lr),Cv=Ca;let Lr=lr==="value"?Cv:x(Cv);if(ct.attrName=Lc,ct.attrValue=Lr,ct.keepAttr=!0,ct.forceKeepAttr=void 0,Aa(kt.uponSanitizeAttribute,le,ct),Lr=ct.attrValue,Gn&&(Lc==="id"||Lc==="name")&&(il(lr,le),Lr=Or+Lr),sr&&$(/((--!?|])>)|<\/(style|title|textarea)/i,Lr)){il(lr,le);continue}if(Lc==="attributename"&&b(Lr,"href")){il(lr,le);continue}if(ct.forceKeepAttr)continue;if(!ct.keepAttr){il(lr,le);continue}if(!Ct&&$(/\/>/i,Lr)){il(lr,le);continue}dn&&d([cn,ut,pt],X1=>{Lr=y(Lr,X1," ")});const J1=Sr(le.nodeName);if(!G1(J1,Lc,Lr)){il(lr,le);continue}if(Et&&typeof We=="object"&&typeof We.getAttributeType=="function"&&!Ti)switch(We.getAttributeType(J1,Lc)){case"TrustedHTML":{Lr=Et.createHTML(Lr);break}case"TrustedScriptURL":{Lr=Et.createScriptURL(Lr);break}}if(Lr!==Cv)try{Ti?le.setAttributeNS(Ti,lr,Lr):le.setAttribute(lr,Lr),Av(le)?Yo(le):h(Pe.removed)}catch{il(lr,le)}}Aa(kt.afterSanitizeAttributes,le,null)},bM=function dt(le){let Ve=null;const ct=H1(le);for(Aa(kt.beforeSanitizeShadowDOM,le,null);Ve=ct.nextNode();)Aa(kt.uponSanitizeShadowNode,Ve,null),V1(Ve),Y1(Ve),Ve.content instanceof Ke&&dt(Ve.content);Aa(kt.afterSanitizeShadowDOM,le,null)};return Pe.sanitize=function(dt){let le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ve=null,ct=null,Dn=null,Kr=null;if(Ev=!dt,Ev&&(dt="<!-->"),typeof dt!="string"&&!K1(dt))if(typeof dt.toString=="function"){if(dt=dt.toString(),typeof dt!="string")throw A("dirty is not a string, aborting")}else throw A("toString is not a function");if(!Pe.isSupported)return dt;if(ko||$v(le),Pe.removed=[],typeof dt=="string"&&(Od=!1),Od){if(dt.nodeName){const Ca=Sr(dt.nodeName);if(!It[Ca]||ni[Ca])throw A("root node is forbidden and cannot be sanitized in-place")}}else if(dt instanceof Te)Ve=q1("<!---->"),ct=Ve.ownerDocument.importNode(dt,!0),ct.nodeType===_e.element&&ct.nodeName==="BODY"||ct.nodeName==="HTML"?Ve=ct:Ve.appendChild(ct);else{if(!Mn&&!dn&&!mr&&dt.indexOf("<")===-1)return Et&&Hr?Et.createHTML(dt):dt;if(Ve=q1(dt),!Ve)return Mn?null:Hr?Yt:""}Ve&&Zn&&Yo(Ve.firstChild);const lr=H1(Od?dt:Ve);for(;Dn=lr.nextNode();)V1(Dn),Y1(Dn),Dn.content instanceof Ke&&bM(Dn.content);if(Od)return dt;if(Mn){if(qr)for(Kr=gr.call(Ve.ownerDocument);Ve.firstChild;)Kr.appendChild(Ve.firstChild);else Kr=Ve;return(Ht.shadowroot||Ht.shadowrootmode)&&(Kr=Xn.call(Ee,Kr,!0)),Kr}let Ti=mr?Ve.outerHTML:Ve.innerHTML;return mr&&It["!doctype"]&&Ve.ownerDocument&&Ve.ownerDocument.doctype&&Ve.ownerDocument.doctype.name&&$(me,Ve.ownerDocument.doctype.name)&&(Ti="<!DOCTYPE "+Ve.ownerDocument.doctype.name+`>
|
|
140
140
|
`+Ti),dn&&d([cn,ut,pt],Ca=>{Ti=y(Ti,Ca," ")}),Et&&Hr?Et.createHTML(Ti):Ti},Pe.setConfig=function(){let dt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};$v(dt),ko=!0},Pe.clearConfig=function(){Oc=null,ko=!1},Pe.isValidAttribute=function(dt,le,Ve){Oc||$v({});const ct=Sr(dt),Dn=Sr(le);return G1(ct,Dn,Ve)},Pe.addHook=function(dt,le){typeof le=="function"&&p(kt[dt],le)},Pe.removeHook=function(dt,le){if(le!==void 0){const Ve=f(kt[dt],le);return Ve===-1?void 0:g(kt[dt],Ve,1)[0]}return h(kt[dt])},Pe.removeHooks=function(dt){kt[dt]=[]},Pe.removeAllHooks=function(){kt=Oe()},Pe}var Re=je();return u_=Re,u_}var d_,$S;function cB(){return $S||($S=1,d_=self.DOMPurify||(self.DOMPurify=TS().default||TS())),d_}var Qr=cB();function jx(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var pc=jx();function QP(t){pc=t}var yf={exec:()=>null};function en(t,e=""){let n=typeof t=="string"?t:t.source,r={replace:(i,o)=>{let a=typeof o=="string"?o:o.source;return a=a.replace(fi.caret,"$1"),n=n.replace(i,a),r},getRegex:()=>new RegExp(n,e)};return r}var uB=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),fi={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},dB=/^(?:[ \t]*(?:\n|$))+/,fB=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,hB=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ih=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,pB=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ux=/(?:[*+-]|\d{1,9}[.)])/,eO=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,tO=en(eO).replace(/bull/g,Ux).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),gB=en(eO).replace(/bull/g,Ux).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Bx=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,mB=/^[^\n]+/,qx=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,vB=en(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",qx).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),_B=en(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ux).getRegex(),Um="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Hx=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,bB=en("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Hx).replace("tag",Um).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),nO=en(Bx).replace("hr",Ih).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Um).getRegex(),yB=en(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",nO).getRegex(),Kx={blockquote:yB,code:fB,def:vB,fences:hB,heading:pB,hr:Ih,html:bB,lheading:tO,list:_B,newline:dB,paragraph:nO,table:yf,text:mB},AS=en("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ih).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Um).getRegex(),wB={...Kx,lheading:gB,table:AS,paragraph:en(Bx).replace("hr",Ih).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",AS).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Um).getRegex()},xB={...Kx,html:en(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Hx).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:yf,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:en(Bx).replace("hr",Ih).replace("heading",` *#{1,6} *[^
|
|
141
141
|
]`).replace("lheading",tO).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},kB=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,SB=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,rO=/^( {2,}|\\)\n(?!\s*$)/,EB=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Bm=/[\p{P}\p{S}]/u,Vx=/[\s\p{P}\p{S}]/u,iO=/[^\s\p{P}\p{S}]/u,TB=en(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Vx).getRegex(),oO=/(?!~)[\p{P}\p{S}]/u,$B=/(?!~)[\s\p{P}\p{S}]/u,AB=/(?:[^\s\p{P}\p{S}]|~)/u,CB=en(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",uB?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),aO=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,PB=en(aO,"u").replace(/punct/g,Bm).getRegex(),OB=en(aO,"u").replace(/punct/g,oO).getRegex(),sO="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",LB=en(sO,"gu").replace(/notPunctSpace/g,iO).replace(/punctSpace/g,Vx).replace(/punct/g,Bm).getRegex(),IB=en(sO,"gu").replace(/notPunctSpace/g,AB).replace(/punctSpace/g,$B).replace(/punct/g,oO).getRegex(),NB=en("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,iO).replace(/punctSpace/g,Vx).replace(/punct/g,Bm).getRegex(),RB=en(/\\(punct)/,"gu").replace(/punct/g,Bm).getRegex(),MB=en(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),DB=en(Hx).replace("(?:-->|$)","-->").getRegex(),FB=en("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",DB).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),kg=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,zB=en(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",kg).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),lO=en(/^!?\[(label)\]\[(ref)\]/).replace("label",kg).replace("ref",qx).getRegex(),cO=en(/^!?\[(ref)\](?:\[\])?/).replace("ref",qx).getRegex(),jB=en("reflink|nolink(?!\\()","g").replace("reflink",lO).replace("nolink",cO).getRegex(),CS=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Gx={_backpedal:yf,anyPunctuation:RB,autolink:MB,blockSkip:CB,br:rO,code:SB,del:yf,emStrongLDelim:PB,emStrongRDelimAst:LB,emStrongRDelimUnd:NB,escape:kB,link:zB,nolink:cO,punctuation:TB,reflink:lO,reflinkSearch:jB,tag:FB,text:EB,url:yf},UB={...Gx,link:en(/^!?\[(label)\]\((.*?)\)/).replace("label",kg).getRegex(),reflink:en(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",kg).getRegex()},iy={...Gx,emStrongRDelimAst:IB,emStrongLDelim:OB,url:en(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",CS).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:en(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",CS).getRegex()},BB={...iy,br:en(rO).replace("{2,}","*").getRegex(),text:en(iy.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},xp={normal:Kx,gfm:wB,pedantic:xB},zd={normal:Gx,gfm:iy,breaks:BB,pedantic:UB},qB={"&":"&","<":"<",">":">",'"':""","'":"'"},PS=t=>qB[t];function La(t,e){if(e){if(fi.escapeTest.test(t))return t.replace(fi.escapeReplace,PS)}else if(fi.escapeTestNoEncode.test(t))return t.replace(fi.escapeReplaceNoEncode,PS);return t}function OS(t){try{t=encodeURI(t).replace(fi.percentDecode,"%")}catch{return null}return t}function LS(t,e){let n=t.replace(fi.findPipe,(o,a,s)=>{let l=!1,u=a;for(;--u>=0&&s[u]==="\\";)l=!l;return l?"|":" |"}),r=n.split(fi.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(fi.slashPipe,"|");return r}function jd(t,e,n){let r=t.length;if(r===0)return"";let i=0;for(;i<r&&t.charAt(r-i-1)===e;)i++;return t.slice(0,r-i)}function HB(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let r=0;r<t.length;r++)if(t[r]==="\\")r++;else if(t[r]===e[0])n++;else if(t[r]===e[1]&&(n--,n<0))return r;return n>0?-2:-1}function IS(t,e,n,r,i){let o=e.href,a=e.title||null,s=t[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let l={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:o,title:a,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,l}function KB(t,e,n){let r=t.match(n.other.indentCodeCompensation);if(r===null)return e;let i=r[1];return e.split(`
|
|
142
142
|
`).map(o=>{let a=o.match(n.other.beginningSpace);if(a===null)return o;let[s]=a;return s.length>=i.length?o.slice(i.length):o}).join(`
|
|
@@ -195,7 +195,7 @@ ${this.parser.parse(e)}</blockquote>
|
|
|
195
195
|
${e}</tr>
|
|
196
196
|
`}tablecell(e){let n=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+n+`</${r}>
|
|
197
197
|
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${La(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:n,tokens:r}){let i=this.parser.parseInline(r),o=OS(e);if(o===null)return i;e=o;let a='<a href="'+e+'"';return n&&(a+=' title="'+La(n)+'"'),a+=">"+i+"</a>",a}image({href:e,title:n,text:r,tokens:i}){i&&(r=this.parser.parseInline(i,this.parser.textRenderer));let o=OS(e);if(o===null)return La(r);e=o;let a=`<img src="${e}" alt="${r}"`;return n&&(a+=` title="${La(n)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:La(e.text)}},Wx=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},To=class ay{options;renderer;textRenderer;constructor(e){this.options=e||pc,this.options.renderer=this.options.renderer||new Eg,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Wx}static parse(e,n){return new ay(n).parse(e)}static parseInline(e,n){return new ay(n).parseInline(e)}parse(e){let n="";for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let a=i,s=this.options.extensions.renderers[a.type].call({parser:this},a);if(s!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(a.type)){n+=s||"";continue}}let o=i;switch(o.type){case"space":{n+=this.renderer.space(o);break}case"hr":{n+=this.renderer.hr(o);break}case"heading":{n+=this.renderer.heading(o);break}case"code":{n+=this.renderer.code(o);break}case"table":{n+=this.renderer.table(o);break}case"blockquote":{n+=this.renderer.blockquote(o);break}case"list":{n+=this.renderer.list(o);break}case"checkbox":{n+=this.renderer.checkbox(o);break}case"html":{n+=this.renderer.html(o);break}case"def":{n+=this.renderer.def(o);break}case"paragraph":{n+=this.renderer.paragraph(o);break}case"text":{n+=this.renderer.text(o);break}default:{let a='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return n}parseInline(e,n=this.renderer){let r="";for(let i=0;i<e.length;i++){let o=e[i];if(this.options.extensions?.renderers?.[o.type]){let s=this.options.extensions.renderers[o.type].call({parser:this},o);if(s!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){r+=s||"";continue}}let a=o;switch(a.type){case"escape":{r+=n.text(a);break}case"html":{r+=n.html(a);break}case"link":{r+=n.link(a);break}case"image":{r+=n.image(a);break}case"checkbox":{r+=n.checkbox(a);break}case"strong":{r+=n.strong(a);break}case"em":{r+=n.em(a);break}case"codespan":{r+=n.codespan(a);break}case"br":{r+=n.br(a);break}case"del":{r+=n.del(a);break}case"text":{r+=n.text(a);break}default:{let s='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return r}},af=class{options;block;constructor(e){this.options=e||pc}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?Eo.lex:Eo.lexInline}provideParser(){return this.block?To.parse:To.parseInline}},VB=class{defaults=jx();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=To;Renderer=Eg;TextRenderer=Wx;Lexer=Eo;Tokenizer=Sg;Hooks=af;constructor(...e){this.use(...e)}walkTokens(e,n){let r=[];for(let i of e)switch(r=r.concat(n.call(this,i)),i.type){case"table":{let o=i;for(let a of o.header)r=r.concat(this.walkTokens(a.tokens,n));for(let a of o.rows)for(let s of a)r=r.concat(this.walkTokens(s.tokens,n));break}case"list":{let o=i;r=r.concat(this.walkTokens(o.items,n));break}default:{let o=i;this.defaults.extensions?.childTokens?.[o.type]?this.defaults.extensions.childTokens[o.type].forEach(a=>{let s=o[a].flat(1/0);r=r.concat(this.walkTokens(s,n))}):o.tokens&&(r=r.concat(this.walkTokens(o.tokens,n)))}}return r}use(...e){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{let i={...r};if(i.async=this.defaults.async||i.async||!1,r.extensions&&(r.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let a=n.renderers[o.name];a?n.renderers[o.name]=function(...s){let l=o.renderer.apply(this,s);return l===!1&&(l=a.apply(this,s)),l}:n.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=n[o.level];a?a.unshift(o.tokenizer):n[o.level]=[o.tokenizer],o.start&&(o.level==="block"?n.startBlock?n.startBlock.push(o.start):n.startBlock=[o.start]:o.level==="inline"&&(n.startInline?n.startInline.push(o.start):n.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(n.childTokens[o.name]=o.childTokens)}),i.extensions=n),r.renderer){let o=this.defaults.renderer||new Eg(this.defaults);for(let a in r.renderer){if(!(a in o))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let s=a,l=r.renderer[s],u=o[s];o[s]=(...d)=>{let f=l.apply(o,d);return f===!1&&(f=u.apply(o,d)),f||""}}i.renderer=o}if(r.tokenizer){let o=this.defaults.tokenizer||new Sg(this.defaults);for(let a in r.tokenizer){if(!(a in o))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let s=a,l=r.tokenizer[s],u=o[s];o[s]=(...d)=>{let f=l.apply(o,d);return f===!1&&(f=u.apply(o,d)),f}}i.tokenizer=o}if(r.hooks){let o=this.defaults.hooks||new af;for(let a in r.hooks){if(!(a in o))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let s=a,l=r.hooks[s],u=o[s];af.passThroughHooks.has(a)?o[s]=d=>{if(this.defaults.async&&af.passThroughHooksRespectAsync.has(a))return(async()=>{let h=await l.call(o,d);return u.call(o,h)})();let f=l.call(o,d);return u.call(o,f)}:o[s]=(...d)=>{if(this.defaults.async)return(async()=>{let h=await l.apply(o,d);return h===!1&&(h=await u.apply(o,d)),h})();let f=l.apply(o,d);return f===!1&&(f=u.apply(o,d)),f}}i.hooks=o}if(r.walkTokens){let o=this.defaults.walkTokens,a=r.walkTokens;i.walkTokens=function(s){let l=[];return l.push(a.call(this,s)),o&&(l=l.concat(o.call(this,s))),l}}this.defaults={...this.defaults,...i}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,n){return Eo.lex(e,n??this.defaults)}parser(e,n){return To.parse(e,n??this.defaults)}parseMarkdown(e){return(n,r)=>{let i={...r},o={...this.defaults,...i},a=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&i.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=e),o.async)return(async()=>{let s=o.hooks?await o.hooks.preprocess(n):n,l=await(o.hooks?await o.hooks.provideLexer():e?Eo.lex:Eo.lexInline)(s,o),u=o.hooks?await o.hooks.processAllTokens(l):l;o.walkTokens&&await Promise.all(this.walkTokens(u,o.walkTokens));let d=await(o.hooks?await o.hooks.provideParser():e?To.parse:To.parseInline)(u,o);return o.hooks?await o.hooks.postprocess(d):d})().catch(a);try{o.hooks&&(n=o.hooks.preprocess(n));let s=(o.hooks?o.hooks.provideLexer():e?Eo.lex:Eo.lexInline)(n,o);o.hooks&&(s=o.hooks.processAllTokens(s)),o.walkTokens&&this.walkTokens(s,o.walkTokens);let l=(o.hooks?o.hooks.provideParser():e?To.parse:To.parseInline)(s,o);return o.hooks&&(l=o.hooks.postprocess(l)),l}catch(s){return a(s)}}}onError(e,n){return r=>{if(r.message+=`
|
|
198
|
-
Please report this to https://github.com/markedjs/marked.`,e){let i="<p>An error occurred:</p><pre>"+La(r.message+"",!0)+"</pre>";return n?Promise.resolve(i):i}if(n)return Promise.reject(r);throw r}}},Kl=new VB;function Ut(t,e){return Kl.parse(t,e)}Ut.options=Ut.setOptions=function(t){return Kl.setOptions(t),Ut.defaults=Kl.defaults,QP(Ut.defaults),Ut};Ut.getDefaults=jx;Ut.defaults=pc;Ut.use=function(...t){return Kl.use(...t),Ut.defaults=Kl.defaults,QP(Ut.defaults),Ut};Ut.walkTokens=function(t,e){return Kl.walkTokens(t,e)};Ut.parseInline=Kl.parseInline;Ut.Parser=To;Ut.parser=To.parse;Ut.Renderer=Eg;Ut.TextRenderer=Wx;Ut.Lexer=Eo;Ut.lexer=Eo.lex;Ut.Tokenizer=Sg;Ut.Hooks=af;Ut.parse=Ut;Ut.options;Ut.setOptions;var GB=Ut.use;Ut.walkTokens;var uO=Ut.parseInline,Yx=Ut;To.parse;Eo.lex;const WB=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],NS={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function dO(t){const e=typeof t=="string"?t.charCodeAt(0):t;return e>=48&&e<=57}function YB(t){const e=typeof t=="string"?t.charCodeAt(0):t;return e>=97&&e<=102||e>=65&&e<=70||e>=48&&e<=57}function JB(t){const e=typeof t=="string"?t.charCodeAt(0):t;return e>=97&&e<=122||e>=65&&e<=90}function RS(t){return JB(t)||dO(t)}const MS=document.createElement("i");function DS(t){const e="&"+t+";";MS.innerHTML=e;const n=MS.textContent;return n.charCodeAt(n.length-1)===59&&t!=="semi"||n===e?!1:n}const XB=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function ZB(t,e){const n={},r=typeof n.additional=="string"?n.additional.charCodeAt(0):n.additional,i=[];let o=0,a=-1,s="",l,u;n.position&&("start"in n.position||"indent"in n.position?(u=n.position.indent,l=n.position.start):l=n.position);let d=(l?l.line:0)||1,f=(l?l.column:0)||1,h=g(),p;for(o--;++o<=t.length;)if(p===10&&(f=(u?u[a]:0)||1),p=t.charCodeAt(o),p===38){const b=t.charCodeAt(o+1);if(b===9||b===10||b===12||b===32||b===38||b===60||Number.isNaN(b)||r&&b===r){s+=String.fromCharCode(p),f++;continue}const y=o+1;let w=y,x=y,E;if(b===35){x=++w;const I=t.charCodeAt(x);I===88||I===120?(E="hexadecimal",x=++w):E="decimal"}else E="named";let $="",A="",k="";const T=E==="named"?RS:E==="decimal"?dO:YB;for(x--;++x<=t.length;){const I=t.charCodeAt(x);if(!T(I))break;k+=String.fromCharCode(I),E==="named"&&WB.includes(k)&&($=k,A=DS(k))}let C=t.charCodeAt(x)===59;if(C){x++;const I=E==="named"?DS(k):!1;I&&($=k,A=I)}let P=1+x-y,O="";if(!(!C&&n.nonTerminated===!1))if(!k)E!=="named"&&m(4,P);else if(E==="named"){if(C&&!A)m(5,1);else if($!==k&&(x=w+$.length,P=1+x-w,C=!1),!C){const I=$?1:3;if(n.attribute){const L=t.charCodeAt(x);L===61?(m(I,P),A=""):RS(L)?A="":m(I,P)}else m(I,P)}O=A}else{C||m(2,P);let I=Number.parseInt(k,E==="hexadecimal"?16:10);if(QB(I))m(7,P),O="�";else if(I in NS)m(6,P),O=NS[I];else{let L="";e4(I)&&m(6,P),I>65535&&(I-=65536,L+=String.fromCharCode(I>>>10|55296),I=56320|I&1023),O=L+String.fromCharCode(I)}}if(O){v(),h=g(),o=x-1,f+=x-y+1,i.push(O);const I=g();I.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,O,{start:h,end:I},t.slice(y-1,x)),h=I}else k=t.slice(y-1,x),s+=k,f+=k.length,o=x-1}else p===10&&(d++,a++,f=0),Number.isNaN(p)?v():(s+=String.fromCharCode(p),f++);return i.join("");function g(){return{line:d,column:f,offset:o+((l?l.offset:0)||0)}}function m(b,y){let w;n.warning&&(w=g(),w.column+=y,w.offset+=y,n.warning.call(n.warningContext||void 0,XB[b],w,b))}function v(){s&&(i.push(s),n.text&&n.text.call(n.textContext||void 0,s,{start:h,end:g()}),s="")}}function QB(t){return t>=55296&&t<=57343||t>1114111}function e4(t){return t>=1&&t<=8||t===11||t>=13&&t<=31||t>=127&&t<=159||t>=64976&&t<=65007||(t&65535)===65535||(t&65535)===65534}const FS=(t,{allowMarkdown:e=!1}={})=>(t=uO(t),t=Qr.sanitize(t,{ALLOWED_TAGS:e?["strong","em","code"]:[]}),t=ZB(t),t.trim()),Ou=(t,{identifierField:e="title",useBody:n=!0}={})=>{const r=[e,"title","name","label"].find(i=>typeof t[i]=="string"&&!!t[i].trim());return r?t[r].trim():n&&typeof t.body=="string"?t.body.match(/^#+\s+(?<header>.+?)(?:\s+\{#.+?\})?\s*$/m)?.groups?.header??"":""},t4=(t,e)=>{const{slug:n,entryPath:r,basePath:i,commitDate:o,commitAuthor:a}=e;if(t==="slug")return n;if(t==="dirname"){let s=r.replace(/[^/]+$/,"");if(i){const l=i.endsWith("/")?i:`${i}/`;s.startsWith(l)?s=s.slice(l.length):s.startsWith(i)&&(s=s.slice(i.length))}return on(s)}if(t==="filename")return r.split("/").pop().split(".").shift();if(t==="extension")return r.split("/").pop().split(".").pop();if(t==="commit_date")return o??"";if(t==="commit_author")return a?.name||a?.login||a?.email},n4=(t,e)=>{const{content:n,collectionName:r,replaceSubContext:i,defaultLocale:o}=e,[a,...s]=t.split(/\s*\|\s*/),l=a.replace(/^fields\./,""),u={collectionName:r,valueMap:n,keyPath:l};let d=t4(a,i);if(d===void 0&&(d=s.some(f=>Mx.test(f)||VP.test(f))?n[l]:dd({...u,locale:o})),d===void 0)return"";if(d instanceof Date&&!s.length){const{year:f,month:h,day:p}=jl({date:d});return`${f}-${h}-${p}`}return s.length&&(d=Dx({fieldConfig:gn({...u}),value:d,transformations:s})),String(d)},ld=(t,e,{locale:n,useTemplate:r=!1,allowMarkdown:i=!1}={})=>{if(Ea(t,e))return Mi(t)?.label;const{_type:o,name:a,_i18n:{defaultLocale:s}}=t,{_file:{basePath:l}={},identifier_field:u="title",summary:d}=o==="entry"?t:{},{locales:f,slug:h,commitDate:p,commitAuthor:g}=e,{content:m={},path:v=""}=f[n??s]??Object.values(f)[0]??{};if(!r||!d)return FS(Ou(m,{identifierField:u})||h.replaceAll("-"," "),{allowMarkdown:i});const b={content:m,collectionName:a,replaceSubContext:{slug:h,entryPath:v,commitDate:p,commitAuthor:g,basePath:l},defaultLocale:s};return FS(d.replace(/{{(.+?)}}/g,(y,w)=>n4(w,b)),{allowMarkdown:i})},f_=new Map,h_=t=>/{{.+?}}/.test(t)?t:t==="slug"?"{{fields.slug}}":`{{${t}}}`,r4=t=>{if(!t)return{isSimpleListField:!1,isSingleSubfieldListField:!1};const e=t.widget==="list",n=e?"field"in t:!1,r=e?"fields"in t:!1,i=e?"types"in t:!1;return{isSimpleListField:e&&!n&&!r&&!i,isSingleSubfieldListField:e&&n&&!r&&!i}},fO=(t,e,n)=>{const{slug:r,locale:i,getDisplayValue:o}=e,{content:a,locales:s,defaultLocale:l,identifierField:u}=n;if(t==="slug")return r;if(t==="locale")return i;const d=t.replace(/^fields\./,"");return o(d)||o(d,l)||Ou(a,{identifierField:u})||Ou(s[l]?.content||{},{identifierField:u})||r},Jx=(t,e,n,r)=>{let{label:i,value:o,searchValue:a}=t;return e.forEach(s=>{const l=fO(s,n,r);i=i.replaceAll(`{{${s}}}`,l),o=o.replaceAll(`{{${s}}}`,l),a=a?.replaceAll(`{{${s}}}`,l)??""}),{label:i,value:o,searchValue:a}},p_=t=>[...t.matchAll(/{{(.+?)}}/g)].map(e=>e[1]),i4=(t,e)=>{const n=t.value_field,r=t.display_fields??[n??`{{${e}}}`],i=t.search_fields??r,o=h_(n??"{{slug}}"),a=r.map(h_).join(" "),s=i.map(h_).join(" "),l=$u([...p_(a),...p_(o),...p_(s)]);return{_valueField:o,_displayField:a,_searchField:s,allFieldNames:l,hasListFields:l.some(u=>u.includes("*"))}},o4=(t,e,n=void 0,r=[])=>t.filter(i=>!n||n===i.slug).map(i=>{const{content:o}=i.locales[e]??i.locales._default??{};return{refEntry:i,hasContent:!!o&&Object.keys(o).length>0,content:o??{}}}).filter(({hasContent:i,content:o})=>i&&r.every(({field:a,values:s})=>s.includes(o[a]))),a4=({templates:t,allFieldNames:e,context:n,fallbackContext:r})=>{const{slug:i}=n,{_displayField:o,_valueField:a,_searchField:s}=t,{content:l,locales:u,defaultLocale:d,identifierField:f}=r,h=Object.fromEntries(e.map(v=>[v,fO(v,n,r)]));let p=o,g=a,m=s;return Object.entries(h).forEach(([v,b])=>{p=p.replaceAll(`{{${v}}}`,b),g=g.replaceAll(`{{${v}}}`,b),m=m.replaceAll(`{{${v}}}`,b)}),(!p||p.trim()==="")&&(p=Ou(l,{identifierField:f})||Ou(u[d]?.content||{},{identifierField:f})||i),{label:p||"",value:g||i,searchValue:m||p||""}},s4=(t,e)=>{const n=new Map,r=new Map;return t.filter(i=>i.includes("*")).forEach(i=>{const o=i.replace(/\.\*.*$/,""),a=gn({...e,keyPath:o});n.set(i,{baseFieldName:o,fieldConfig:a,...r4(a)})}),[...n.entries()].forEach(([i,o])=>{const{baseFieldName:a}=o;r.has(a)||r.set(a,[]),r.get(a).push([i,o])}),r},l4=({baseFieldName:t,groupEntries:e,content:n,templates:r,allFieldNames:i,context:o,fallbackContext:a})=>{const{_displayField:s,_valueField:l,_searchField:u}=r,d=new RegExp(`^${Xt(t)}\\.\\d+$`),h=Object.entries(n).filter(([b])=>d.test(b)).map(([,b])=>b).join(" "),p={label:s,value:l,searchValue:u};e.forEach(([b])=>{p.label=p.label.replaceAll(`{{${b}}}`,h),p.value=p.value.replaceAll(`{{${b}}}`,h),p.searchValue=p.searchValue.replaceAll(`{{${b}}}`,h)});const{label:g,value:m,searchValue:v}=Jx(p,i.filter(b=>!b.includes("*")),o,a);return{label:g||"",value:m||o.slug,searchValue:v||g||""}},c4=/^([^.]+)\.\*\.([^.]+)$/,u4=t=>{let e=null;return t.some(([n])=>(e=n.match(c4),!!e)),e},d4=({groupEntries:t,content:e,templates:n,allFieldNames:r,context:i,fallbackContext:o})=>{const[,a,s]=u4(t)??[];if(!a)return[];const l=new RegExp(`^${Xt(a)}\\.\\d+\\.${Xt(s)}$`),u=Object.entries(e).filter(([p])=>l.test(p)).map(([p,g])=>{const m=Xt(a),v=Xt(s),b=`^${m}\\.([0-9]+)\\.${v}$`,y=new RegExp(b),w=p.match(y);return{index:parseInt(w?.[1]||"0",10),value:g}}).sort((p,g)=>p.index-g.index),{_displayField:d,_valueField:f,_searchField:h}=n;return u.map(({index:p})=>{const g={label:d,value:f,searchValue:h};t.forEach(([y])=>{const w=y.match(/^([^.]+)\.\*\.([^.]+)$/);if(w){const[,,x]=w,E=e[`${a}.${p}.${x}`]||"";g.label=g.label.replaceAll(`{{${y}}}`,E),g.value=g.value.replaceAll(`{{${y}}}`,E),g.searchValue=g.searchValue.replaceAll(`{{${y}}}`,E)}});const{label:m,value:v,searchValue:b}=Jx(g,r.filter(y=>!y.includes("*")),i,o);return{label:m||"",value:v||i.slug,searchValue:b||m||""}})},f4=({baseFieldGroups:t,content:e,templates:n,allFieldNames:r,context:i,fallbackContext:o})=>{const a=[];let s=!1;return t.forEach((l,u)=>{if(l.length===0)return;const[,d]=l[0];if(d.isSingleSubfieldListField){const f=l4({baseFieldName:u,groupEntries:l,content:e,templates:n,allFieldNames:r,context:i,fallbackContext:o});a.push(f),s=!0}else{const f=d4({groupEntries:l,content:e,templates:n,allFieldNames:r,context:i,fallbackContext:o});a.push(...f),s=!0}}),{results:a,hasProcessedListFields:s}},h4=({refEntry:t,content:e,collection:n,templates:r,allFieldNames:i,hasListFields:o,collectionName:a,fileName:s,locale:l,identifierField:u,defaultLocale:d})=>{const{slug:f,locales:h}=t,p=Ea(n,t),g={collectionName:a,fileName:s,isIndexFile:p,keyPath:""},v={slug:f,locale:l,getDisplayValue:(O,I)=>dd({...g,keyPath:O,valueMap:I?h[I].content:e,locale:I??l})},b={content:e,locales:h,defaultLocale:d,identifierField:u};if(!o)return[a4({templates:r,allFieldNames:i,context:v,fallbackContext:b})];const y=s4(i,g),{results:w,hasProcessedListFields:x}=f4({baseFieldGroups:y,content:e,templates:r,allFieldNames:i,context:v,fallbackContext:b});if(x)return w;const{_displayField:E,_valueField:$,_searchField:A}=r,k={label:E,value:$,searchValue:A},{label:T,value:C,searchValue:P}=Jx(k,i.filter(O=>!O.includes("*")),v,b);return[{label:T||"",value:C||f,searchValue:P||T||""}]},Xx=(t,e,n)=>{const r=JSON.stringify({locale:t,fieldConfig:e,refEntries:n}),i=f_.get(r);if(i)return i;const{collection:o,file:a,filters:s}=e,l=ki(o);if(!l)return f_.set(r,[]),[];const{_type:u,_i18n:{defaultLocale:d}}=l,{identifier_field:f="title"}=u==="entry"?l:{},h=s??[],p=i4(e,f),{allFieldNames:g,hasListFields:m}=p,b=o4(n,t,a,h).map(({refEntry:y,content:w})=>h4({refEntry:y,content:w,collection:l,templates:p,allFieldNames:g,hasListFields:m,collectionName:o,fileName:a,locale:t,identifierField:f,defaultLocale:d})).flat(1).sort((y,w)=>eo(y.label,w.label));return f_.set(r,b),b},hO=({fieldConfig:t,valueMap:e,keyPath:n,locale:r})=>{const{multiple:i,collection:o}=t,a=Sa(o),s=Xx(r,t,a),l=u=>s.find(d=>d.value===u)?.label||u;return i?Object.entries(e).filter(([d])=>d.match(`^${Xt(n)}\\.\\d+$`)).map(([,d])=>d).map(l):l(e[n])},g_=new Map,p4=({fieldConfig:t,valueMap:e,keyPath:n})=>{const r=JSON.stringify({fieldConfig:t,valueMap:e,keyPath:n}),i=g_.get(r);if(i)return i;const{multiple:o,options:a}=t,s=AP(a),l=f=>a.find(h=>h.value===f)?.label||f;if(o){const f=Object.entries(e).filter(([p])=>p.match(`^${Xt(n)}\\.\\d+$`)).map(([,p])=>p),h=s?f.map(l):f;return g_.set(r,h),h}const u=e[n],d=s?l(u):u;return g_.set(r,d),d},zS=t=>{if(!t)return;const e=Object.values(t).map(n=>n.config?.multiple);if(e.includes(!0))return!0;if(e.includes(!1))return!1},jS=t=>{if(!t?.config)return;const{multiple:e}=t.config;if(typeof e=="boolean")return e},qm=t=>{const e=oe(Pt);return t.multiple??zS(t.media_libraries)??jS(t.media_library)??zS(e?.media_libraries)??jS(e?.media_library)??!1},kp=new Map,cd=t=>{const e=t.widget??"string";return Fx.includes(e)?qm(t):jm.includes(e)?!!t.multiple:!1},US=t=>{const e=t.match(/^(.*?)<([^>]+)>(.*)$/);if(!e)return{cleanKey:t};const[,n,r,i]=e;return i?{cleanKey:t}:{cleanKey:n||"",typeName:r}},gn=t=>{const e=JSON.stringify(t);if(kp.has(e))return kp.get(e);const{collectionName:n,fileName:r=void 0,componentName:i=void 0,valueMap:o={},keyPath:a,isIndexFile:s=!1}=t,l=ki(n),u=l&&r?pd(l,r):void 0;if(!l||r&&l?._type!=="entry"&&!u){kp.set(e,void 0);return}const{fields:d=[]}=u??l,f=s?Mi(l):void 0,h=i?ZP(i)?.fields??[]:f?.fields??d,p=a.split(".");let g,m;if(p.forEach((v,b)=>{if(b===0){const{cleanKey:y,typeName:w}=US(v);g=h.find(({name:x})=>x===y),!g&&f?.fields&&(g=d.find(({name:x})=>x===y)),w&&(m=w)}else if(g){const{cleanKey:y,typeName:w}=US(v),{widget:x="text"}=g;w&&(m=w);const E=/^\d+$/.test(y),$=y==="*";if((E||$)&&jm.includes(x)){cd(g)||(g=void 0);return}const{field:A}=g,{fields:k}=g,{types:T,typeKey:C="type"}=g;if(A){const P=E||$?p[b+1]:void 0;!P||A.name===P||A.widget==="object"&&"fields"in A&&A.fields?.some(O=>O.name===P)?g=A:g=void 0}else if(!(k&&(E||$)))if(k&&!E&&y!=="")g=k.find(({name:P})=>P===y);else if(T&&(E||$)){const P=m??o[[p.slice(0,b).join("."),y,C].join(".")];g=T.find(({name:O})=>O===P),$&&(m=void 0)}else if(T&&v!==C&&y!==C&&y!==""){const P=m??o[[p.slice(0,b).join("."),C].join(".")];g=T.find(({name:O})=>O===P)?.fields?.find(({name:O})=>O===y),m&&(m=void 0)}else g=void 0}}),m&&g&&"types"in g){const{types:v}=g;g=v.find(({name:b})=>b===m)}return kp.set(e,g),g},ud=({fieldConfig:{required:t=!0},locale:e})=>Array.isArray(t)?t.includes(e):!!t,dd=({collectionName:t,fileName:e,valueMap:n={},keyPath:r,locale:i,transformations:o,isIndexFile:a=!1})=>{const s=gn({collectionName:t,fileName:e,valueMap:n,keyPath:r,isIndexFile:a});let l=n[r];if(l===void 0&&o?.length)return"";if(s?.widget==="datetime"&&(o?.some(u=>Mx.test(u))||(l=HP({locale:i,fieldConfig:s,currentValue:l}))),s?.widget==="relation"&&(l=hO({fieldConfig:s,valueMap:n,keyPath:r,locale:i})),s?.widget==="select"&&(l=p4({fieldConfig:s,valueMap:n,keyPath:r})),s?.widget==="list"){const{fields:u}=s,{types:d}=s;u||d||(l=Hl(i).format(Object.entries(n).filter(([f,h])=>f.match(`^${Xt(r)}\\.\\d+$`)&&typeof h=="string"&&!!h).map(([,f])=>f)))}if(s?.widget==="number"){const{value_type:u="int"}=s;(u==="int"||u==="float")&&(l=Intl.NumberFormat(jr(i)).format(Number(l)))}return Array.isArray(l)&&(l=Hl(i).format(l)),o?.length&&(l=Dx({fieldConfig:s,value:l,transformations:o})),String(l??"")},pO=({valueMap:t,locale:e,keyPath:n,keyPathRegex:r,getFieldArgs:i})=>{const o=[`${n}.title`,`${n}.name`,...Object.keys(t)].find(a=>{const s=t[a];if(!r.test(a)||!(typeof s=="string"&&s.trim()||typeof s=="number"&&!Number.isNaN(s)))return!1;const l=gn({...i,keyPath:a});return!!l&&l.widget!=="hidden"});return o?dd({...i,keyPath:o,locale:e}):""},Yf=({entry:t,locale:e,collectionName:n,key:r,resolveRef:i=!0})=>{const{slug:o,locales:a,commitAuthor:{name:s,login:l,email:u}={},commitDate:d}=t;if(r==="slug")return o;if(r==="commit_author")return s||l||u;if(r==="commit_date")return d;const{content:f}=a[e]??{};if(f===void 0)return;const h=ki(n);if(h){if(i){const p=Ea(h,t),g=gn({collectionName:n,keyPath:r,isIndexFile:p});if(g?.widget==="relation")return hO({fieldConfig:g,valueMap:f,keyPath:r,locale:e})}return f[r]}},g4=/^\/?(?<pattern>.+?)(?:\/(?<flags>[dgimsuy]*))?$/,fd=t=>{if(t instanceof RegExp)return t;if(typeof t=="string"){const{pattern:e,flags:n}=t.match(g4)?.groups??{};if(e)try{return new RegExp(e,n)}catch{}}},m4=/!\[.*?\]\((.+?)(?:\s+".*?")?\)/g,Lu=it([]),Sa=t=>{const e=ki(t);if(!e)return[];const{_type:n,_i18n:{defaultLocale:r}}=e,{filter:i}=n==="entry"?e:{},o=i?.field,a=fd(i?.pattern),s=i?.value===void 0?[]:Array.isArray(i.value)?i.value:[i.value];return oe(to).filter(l=>{if(!ls(l).some(({name:d})=>d===t))return!1;if(!o)return!0;const u=Yf({entry:l,locale:r,collectionName:t,key:o})??null;return a?a.test(u):s.includes(u)})},Hm=t=>{if(!t)return!1;const{_type:e}=t;if(e!=="entry")return!0;const{create:n=!1,limit:r=1/0}=t;return n&&Sa(t.name).length<r},BS=async({assetURL:t,newURL:e,collectionName:n,entry:r,content:i,keyPath:o,value:a,isIndexFile:s,collectionFile:l})=>{const u=l?.name,d=gn({collectionName:n,fileName:u,valueMap:i,keyPath:o,isIndexFile:s});if(!d)return!1;const f=t.startsWith("blob:"),h={entry:r,collectionName:n,fileName:u},{widget:p="string"}=d;if(["image","file"].includes(p)){const g=f?await ql({...h,value:a})===t:a===t;return g&&e&&(i[o]=e),g}if(p==="markdown"){const g=[...a.matchAll(m4)];if(g.length)return(await Promise.all(g.map(async([,m])=>{const v=(f?await ql({...h,value:m}):m)===t;return v&&e&&(i[o]=i[o].replace(m,e)),v}))).some(Boolean)}return!1},sy=async(t,{entries:e=oe(to),newURL:n=""}={})=>{const r=oe(Pt)?._baseURL,i=r&&!t.startsWith("blob:")?t.replace(r,""):t,o=await Promise.all(e.map(async a=>{const{locales:s}=a,l=ls(a);return(await Promise.all(Object.values(s).map(async({content:d})=>(await Promise.all(Object.entries(d).map(async([h,p])=>typeof p!="string"||!p?!1:(await Promise.all(l.map(async m=>{const v={assetURL:i,newURL:n,collectionName:m.name,entry:a,content:d,keyPath:h,value:p,isIndexFile:Ea(m,a)},b=Zs(m,a);return b.length?(await Promise.all(b.map(y=>BS({...v,collectionFile:y})))).includes(!0):BS({...v})}))).includes(!0)))).includes(!0)))).includes(!0)}));return e.filter((a,s)=>o[s])},v4=()=>{try{return oe(ce)("index_file")}catch{return"Index File"}},Mi=t=>{if(!Xf(t))return;const{index_file:e}=t;if(!e)return;const n=e===!0?{}:e;return{name:n.name??"_index",label:n.label??v4(),icon:n.icon??"home",fields:n.fields,editor:n.editor}},Ea=(t,e)=>{const n=Mi(t);return n?e.slug===n.name:!1},_4=t=>{const e=Mi(t);return e?!Sa(t.name).some(({slug:n})=>n===e.name):!1};function b4(t,e){let n=t.slice(0,e).split(/\r\n|\n|\r/g);return[n.length,n.pop().length+1]}function y4(t,e,n){let r=t.split(/\r\n|\n|\r/g),i="",o=(Math.log10(e+1)|0)+1;for(let a=e-1;a<=e+1;a++){let s=r[a-1];s&&(i+=a.toString().padEnd(o," "),i+=": ",i+=s,i+=`
|
|
198
|
+
Please report this to https://github.com/markedjs/marked.`,e){let i="<p>An error occurred:</p><pre>"+La(r.message+"",!0)+"</pre>";return n?Promise.resolve(i):i}if(n)return Promise.reject(r);throw r}}},Kl=new VB;function Ut(t,e){return Kl.parse(t,e)}Ut.options=Ut.setOptions=function(t){return Kl.setOptions(t),Ut.defaults=Kl.defaults,QP(Ut.defaults),Ut};Ut.getDefaults=jx;Ut.defaults=pc;Ut.use=function(...t){return Kl.use(...t),Ut.defaults=Kl.defaults,QP(Ut.defaults),Ut};Ut.walkTokens=function(t,e){return Kl.walkTokens(t,e)};Ut.parseInline=Kl.parseInline;Ut.Parser=To;Ut.parser=To.parse;Ut.Renderer=Eg;Ut.TextRenderer=Wx;Ut.Lexer=Eo;Ut.lexer=Eo.lex;Ut.Tokenizer=Sg;Ut.Hooks=af;Ut.parse=Ut;Ut.options;Ut.setOptions;var GB=Ut.use;Ut.walkTokens;var uO=Ut.parseInline,Yx=Ut;To.parse;Eo.lex;const WB=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],NS={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function dO(t){const e=typeof t=="string"?t.charCodeAt(0):t;return e>=48&&e<=57}function YB(t){const e=typeof t=="string"?t.charCodeAt(0):t;return e>=97&&e<=102||e>=65&&e<=70||e>=48&&e<=57}function JB(t){const e=typeof t=="string"?t.charCodeAt(0):t;return e>=97&&e<=122||e>=65&&e<=90}function RS(t){return JB(t)||dO(t)}const MS=document.createElement("i");function DS(t){const e="&"+t+";";MS.innerHTML=e;const n=MS.textContent;return n.charCodeAt(n.length-1)===59&&t!=="semi"||n===e?!1:n}const XB=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function ZB(t,e){const n={},r=typeof n.additional=="string"?n.additional.charCodeAt(0):n.additional,i=[];let o=0,a=-1,s="",l,u;n.position&&("start"in n.position||"indent"in n.position?(u=n.position.indent,l=n.position.start):l=n.position);let d=(l?l.line:0)||1,f=(l?l.column:0)||1,h=g(),p;for(o--;++o<=t.length;)if(p===10&&(f=(u?u[a]:0)||1),p=t.charCodeAt(o),p===38){const b=t.charCodeAt(o+1);if(b===9||b===10||b===12||b===32||b===38||b===60||Number.isNaN(b)||r&&b===r){s+=String.fromCharCode(p),f++;continue}const y=o+1;let w=y,x=y,E;if(b===35){x=++w;const I=t.charCodeAt(x);I===88||I===120?(E="hexadecimal",x=++w):E="decimal"}else E="named";let $="",A="",k="";const T=E==="named"?RS:E==="decimal"?dO:YB;for(x--;++x<=t.length;){const I=t.charCodeAt(x);if(!T(I))break;k+=String.fromCharCode(I),E==="named"&&WB.includes(k)&&($=k,A=DS(k))}let C=t.charCodeAt(x)===59;if(C){x++;const I=E==="named"?DS(k):!1;I&&($=k,A=I)}let P=1+x-y,O="";if(!(!C&&n.nonTerminated===!1))if(!k)E!=="named"&&m(4,P);else if(E==="named"){if(C&&!A)m(5,1);else if($!==k&&(x=w+$.length,P=1+x-w,C=!1),!C){const I=$?1:3;if(n.attribute){const L=t.charCodeAt(x);L===61?(m(I,P),A=""):RS(L)?A="":m(I,P)}else m(I,P)}O=A}else{C||m(2,P);let I=Number.parseInt(k,E==="hexadecimal"?16:10);if(QB(I))m(7,P),O="�";else if(I in NS)m(6,P),O=NS[I];else{let L="";e4(I)&&m(6,P),I>65535&&(I-=65536,L+=String.fromCharCode(I>>>10|55296),I=56320|I&1023),O=L+String.fromCharCode(I)}}if(O){v(),h=g(),o=x-1,f+=x-y+1,i.push(O);const I=g();I.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,O,{start:h,end:I},t.slice(y-1,x)),h=I}else k=t.slice(y-1,x),s+=k,f+=k.length,o=x-1}else p===10&&(d++,a++,f=0),Number.isNaN(p)?v():(s+=String.fromCharCode(p),f++);return i.join("");function g(){return{line:d,column:f,offset:o+((l?l.offset:0)||0)}}function m(b,y){let w;n.warning&&(w=g(),w.column+=y,w.offset+=y,n.warning.call(n.warningContext||void 0,XB[b],w,b))}function v(){s&&(i.push(s),n.text&&n.text.call(n.textContext||void 0,s,{start:h,end:g()}),s="")}}function QB(t){return t>=55296&&t<=57343||t>1114111}function e4(t){return t>=1&&t<=8||t===11||t>=13&&t<=31||t>=127&&t<=159||t>=64976&&t<=65007||(t&65535)===65535||(t&65535)===65534}const FS=(t,{allowMarkdown:e=!1}={})=>(t=uO(t),t=Qr.sanitize(t,{ALLOWED_TAGS:e?["strong","em","code"]:[]}),t=ZB(t),t.trim()),Ou=(t,{identifierField:e="title",useBody:n=!0}={})=>{const r=[e,"title","name","label"].find(i=>typeof t[i]=="string"&&!!t[i].trim());return r?t[r].trim():n&&typeof t.body=="string"?t.body.match(/^#+\s+(?<header>.+?)(?:\s+\{#.+?\})?\s*$/m)?.groups?.header??"":""},t4=(t,e)=>{const{slug:n,entryPath:r,basePath:i,commitDate:o,commitAuthor:a}=e;if(t==="slug")return n;if(t==="dirname"){let s=r.replace(/[^/]+$/,"");if(i){const l=i.endsWith("/")?i:`${i}/`;s.startsWith(l)?s=s.slice(l.length):s.startsWith(i)&&(s=s.slice(i.length))}return on(s)}if(t==="filename")return r.split("/").pop().split(".").shift();if(t==="extension")return r.split("/").pop().split(".").pop();if(t==="commit_date")return o??"";if(t==="commit_author")return a?.name||a?.login||a?.email},n4=(t,e)=>{const{content:n,collectionName:r,replaceSubContext:i,defaultLocale:o}=e,[a,...s]=t.split(/\s*\|\s*/),l=a.replace(/^fields\./,""),u={collectionName:r,valueMap:n,keyPath:l};let d=t4(a,i);if(d===void 0&&(d=s.some(f=>Mx.test(f)||VP.test(f))?n[l]:dd({...u,locale:o})),d===void 0)return"";if(d instanceof Date&&!s.length){const{year:f,month:h,day:p}=jl({date:d});return`${f}-${h}-${p}`}return s.length&&(d=Dx({fieldConfig:gn({...u}),value:d,transformations:s})),String(d)},ld=(t,e,{locale:n,useTemplate:r=!1,allowMarkdown:i=!1}={})=>{if(Ea(t,e))return Mi(t)?.label;const{_type:o,name:a,_i18n:{defaultLocale:s}}=t,{_file:{basePath:l}={},identifier_field:u="title",summary:d}=o==="entry"?t:{},{locales:f,slug:h,commitDate:p,commitAuthor:g}=e,{content:m={},path:v=""}=f[n??s]??Object.values(f)[0]??{};if(!r||!d)return FS(Ou(m,{identifierField:u})||h.replaceAll("-"," "),{allowMarkdown:i});const b={content:m,collectionName:a,replaceSubContext:{slug:h,entryPath:v,commitDate:p,commitAuthor:g,basePath:l},defaultLocale:s};return FS(d.replace(/{{(.+?)}}/g,(y,w)=>n4(w,b)),{allowMarkdown:i})},f_=new Map,h_=t=>/{{.+?}}/.test(t)?t:t==="slug"?"{{fields.slug}}":`{{${t}}}`,r4=t=>{if(!t)return{isSimpleListField:!1,isSingleSubfieldListField:!1};const e=t.widget==="list",n=e?"field"in t:!1,r=e?"fields"in t:!1,i=e?"types"in t:!1;return{isSimpleListField:e&&!n&&!r&&!i,isSingleSubfieldListField:e&&n&&!r&&!i}},fO=(t,e,n)=>{const{slug:r,locale:i,getDisplayValue:o}=e,{content:a,locales:s,defaultLocale:l,identifierField:u}=n;if(t==="slug")return r;if(t==="locale")return i;const d=t.replace(/^fields\./,"");return o(d)||o(d,l)||Ou(a,{identifierField:u})||Ou(s[l]?.content||{},{identifierField:u})||r},Jx=(t,e,n,r)=>{let{label:i,value:o,searchValue:a}=t;return e.forEach(s=>{const l=fO(s,n,r);i=i.replaceAll(`{{${s}}}`,l),o=o.replaceAll(`{{${s}}}`,l),a=a?.replaceAll(`{{${s}}}`,l)??""}),{label:i,value:o,searchValue:a}},p_=t=>[...t.matchAll(/{{(.+?)}}/g)].map(e=>e[1]),i4=(t,e)=>{const n=t.value_field,r=t.display_fields??[n??`{{${e}}}`],i=t.search_fields??r,o=h_(n??"{{slug}}"),a=r.map(h_).join(" "),s=i.map(h_).join(" "),l=$u([...p_(a),...p_(o),...p_(s)]);return{_valueField:o,_displayField:a,_searchField:s,allFieldNames:l,hasListFields:l.some(u=>u.includes("*"))}},o4=(t,e,n=void 0,r=[])=>t.filter(i=>!n||n===i.slug).map(i=>{const{content:o}=i.locales[e]??i.locales._default??{};return{refEntry:i,hasContent:!!o&&Object.keys(o).length>0,content:o??{}}}).filter(({hasContent:i,content:o})=>i&&r.every(({field:a,values:s})=>s.includes(o[a]))),a4=({templates:t,allFieldNames:e,context:n,fallbackContext:r})=>{const{slug:i}=n,{_displayField:o,_valueField:a,_searchField:s}=t,{content:l,locales:u,defaultLocale:d,identifierField:f}=r,h=Object.fromEntries(e.map(v=>[v,fO(v,n,r)]));let p=o,g=a,m=s;return Object.entries(h).forEach(([v,b])=>{p=p.replaceAll(`{{${v}}}`,b),g=g.replaceAll(`{{${v}}}`,b),m=m.replaceAll(`{{${v}}}`,b)}),(!p||p.trim()==="")&&(p=Ou(l,{identifierField:f})||Ou(u[d]?.content||{},{identifierField:f})||i),{label:p||"",value:g||i,searchValue:m||p||""}},s4=(t,e)=>{const n=new Map,r=new Map;return t.filter(i=>i.includes("*")).forEach(i=>{const o=i.replace(/\.\*.*$/,""),a=gn({...e,keyPath:o});n.set(i,{baseFieldName:o,fieldConfig:a,...r4(a)})}),[...n.entries()].forEach(([i,o])=>{const{baseFieldName:a}=o;r.has(a)||r.set(a,[]),r.get(a).push([i,o])}),r},l4=({baseFieldName:t,groupEntries:e,content:n,templates:r,allFieldNames:i,context:o,fallbackContext:a})=>{const{_displayField:s,_valueField:l,_searchField:u}=r,d=new RegExp(`^${Xt(t)}\\.\\d+$`),h=Object.entries(n).filter(([b])=>d.test(b)).map(([,b])=>b).join(" "),p={label:s,value:l,searchValue:u};e.forEach(([b])=>{p.label=p.label.replaceAll(`{{${b}}}`,h),p.value=p.value.replaceAll(`{{${b}}}`,h),p.searchValue=p.searchValue.replaceAll(`{{${b}}}`,h)});const{label:g,value:m,searchValue:v}=Jx(p,i.filter(b=>!b.includes("*")),o,a);return{label:g||"",value:m||o.slug,searchValue:v||g||""}},c4=/^(.+)\.\*\.(.+)$/,u4=t=>{let e=null;return t.some(([n])=>(e=n.match(c4),!!e)),e},d4=({groupEntries:t,content:e,templates:n,allFieldNames:r,context:i,fallbackContext:o})=>{const[,a,s]=u4(t)??[];if(!a)return[];const l=new RegExp(`^${Xt(a)}\\.\\d+\\.${Xt(s)}$`),u=Object.entries(e).filter(([p])=>l.test(p)).map(([p,g])=>{const m=Xt(a),v=Xt(s),b=`^${m}\\.([0-9]+)\\.${v}$`,y=new RegExp(b),w=p.match(y);return{index:parseInt(w?.[1]||"0",10),value:g}}).sort((p,g)=>p.index-g.index),{_displayField:d,_valueField:f,_searchField:h}=n;return u.map(({index:p})=>{const g={label:d,value:f,searchValue:h};t.forEach(([y])=>{const w=y.match(/^(.+)\.\*\.(.+)$/);if(w){const[,x,E]=w,$=e[`${x}.${p}.${E}`]||"";g.label=g.label.replaceAll(`{{${y}}}`,$),g.value=g.value.replaceAll(`{{${y}}}`,$),g.searchValue=g.searchValue.replaceAll(`{{${y}}}`,$)}});const{label:m,value:v,searchValue:b}=Jx(g,r.filter(y=>!y.includes("*")),i,o);return{label:m||"",value:v||i.slug,searchValue:b||m||""}})},f4=({baseFieldGroups:t,content:e,templates:n,allFieldNames:r,context:i,fallbackContext:o})=>{const a=[];let s=!1;return t.forEach((l,u)=>{if(l.length===0)return;const[,d]=l[0];if(d.isSingleSubfieldListField){const f=l4({baseFieldName:u,groupEntries:l,content:e,templates:n,allFieldNames:r,context:i,fallbackContext:o});a.push(f),s=!0}else{const f=d4({groupEntries:l,content:e,templates:n,allFieldNames:r,context:i,fallbackContext:o});a.push(...f),s=!0}}),{results:a,hasProcessedListFields:s}},h4=({refEntry:t,content:e,collection:n,templates:r,allFieldNames:i,hasListFields:o,collectionName:a,fileName:s,locale:l,identifierField:u,defaultLocale:d})=>{const{slug:f,locales:h}=t,p=Ea(n,t),g={collectionName:a,fileName:s,isIndexFile:p,keyPath:""},v={slug:f,locale:l,getDisplayValue:(O,I)=>dd({...g,keyPath:O,valueMap:I?h[I].content:e,locale:I??l})},b={content:e,locales:h,defaultLocale:d,identifierField:u};if(!o)return[a4({templates:r,allFieldNames:i,context:v,fallbackContext:b})];const y=s4(i,g),{results:w,hasProcessedListFields:x}=f4({baseFieldGroups:y,content:e,templates:r,allFieldNames:i,context:v,fallbackContext:b});if(x)return w;const{_displayField:E,_valueField:$,_searchField:A}=r,k={label:E,value:$,searchValue:A},{label:T,value:C,searchValue:P}=Jx(k,i.filter(O=>!O.includes("*")),v,b);return[{label:T||"",value:C||f,searchValue:P||T||""}]},Xx=(t,e,n)=>{const r=JSON.stringify({locale:t,fieldConfig:e,refEntries:n}),i=f_.get(r);if(i)return i;const{collection:o,file:a,filters:s}=e,l=ki(o);if(!l)return f_.set(r,[]),[];const{_type:u,_i18n:{defaultLocale:d}}=l,{identifier_field:f="title"}=u==="entry"?l:{},h=s??[],p=i4(e,f),{allFieldNames:g,hasListFields:m}=p,b=o4(n,t,a,h).map(({refEntry:y,content:w})=>h4({refEntry:y,content:w,collection:l,templates:p,allFieldNames:g,hasListFields:m,collectionName:o,fileName:a,locale:t,identifierField:f,defaultLocale:d})).flat(1).sort((y,w)=>eo(y.label,w.label));return f_.set(r,b),b},hO=({fieldConfig:t,valueMap:e,keyPath:n,locale:r})=>{const{multiple:i,collection:o}=t,a=Sa(o),s=Xx(r,t,a),l=u=>s.find(d=>d.value===u)?.label||u;return i?Object.entries(e).filter(([d])=>d.match(`^${Xt(n)}\\.\\d+$`)).map(([,d])=>d).map(l):l(e[n])},g_=new Map,p4=({fieldConfig:t,valueMap:e,keyPath:n})=>{const r=JSON.stringify({fieldConfig:t,valueMap:e,keyPath:n}),i=g_.get(r);if(i)return i;const{multiple:o,options:a}=t,s=AP(a),l=f=>a.find(h=>h.value===f)?.label||f;if(o){const f=Object.entries(e).filter(([p])=>p.match(`^${Xt(n)}\\.\\d+$`)).map(([,p])=>p),h=s?f.map(l):f;return g_.set(r,h),h}const u=e[n],d=s?l(u):u;return g_.set(r,d),d},zS=t=>{if(!t)return;const e=Object.values(t).map(n=>n.config?.multiple);if(e.includes(!0))return!0;if(e.includes(!1))return!1},jS=t=>{if(!t?.config)return;const{multiple:e}=t.config;if(typeof e=="boolean")return e},qm=t=>{const e=oe(Pt);return t.multiple??zS(t.media_libraries)??jS(t.media_library)??zS(e?.media_libraries)??jS(e?.media_library)??!1},kp=new Map,cd=t=>{const e=t.widget??"string";return Fx.includes(e)?qm(t):jm.includes(e)?!!t.multiple:!1},US=t=>{const e=t.match(/^(.*?)<([^>]+)>(.*)$/);if(!e)return{cleanKey:t};const[,n,r,i]=e;return i?{cleanKey:t}:{cleanKey:n||"",typeName:r}},gn=t=>{const e=JSON.stringify(t);if(kp.has(e))return kp.get(e);const{collectionName:n,fileName:r=void 0,componentName:i=void 0,valueMap:o={},keyPath:a,isIndexFile:s=!1}=t,l=ki(n),u=l&&r?pd(l,r):void 0;if(!l||r&&l?._type!=="entry"&&!u){kp.set(e,void 0);return}const{fields:d=[]}=u??l,f=s?Mi(l):void 0,h=i?ZP(i)?.fields??[]:f?.fields??d,p=a.split(".");let g,m;if(p.forEach((v,b)=>{if(b===0){const{cleanKey:y,typeName:w}=US(v);g=h.find(({name:x})=>x===y),!g&&f?.fields&&(g=d.find(({name:x})=>x===y)),w&&(m=w)}else if(g){const{cleanKey:y,typeName:w}=US(v),{widget:x="text"}=g;w&&(m=w);const E=/^\d+$/.test(y),$=y==="*";if((E||$)&&jm.includes(x)){cd(g)||(g=void 0);return}const{field:A}=g,{fields:k}=g,{types:T,typeKey:C="type"}=g;if(A){const P=E||$?p[b+1]:void 0;!P||A.name===P||A.widget==="object"&&"fields"in A&&A.fields?.some(O=>O.name===P)?g=A:g=void 0}else if(!(k&&(E||$)))if(k&&!E&&y!=="")g=k.find(({name:P})=>P===y);else if(T&&(E||$)){const P=m??o[[p.slice(0,b).join("."),y,C].join(".")];g=T.find(({name:O})=>O===P),$&&(m=void 0)}else if(T&&v!==C&&y!==C&&y!==""){const P=m??o[[p.slice(0,b).join("."),C].join(".")];g=T.find(({name:O})=>O===P)?.fields?.find(({name:O})=>O===y),m&&(m=void 0)}else g=void 0}}),m&&g&&"types"in g){const{types:v}=g;g=v.find(({name:b})=>b===m)}return kp.set(e,g),g},ud=({fieldConfig:{required:t=!0},locale:e})=>Array.isArray(t)?t.includes(e):!!t,dd=({collectionName:t,fileName:e,valueMap:n={},keyPath:r,locale:i,transformations:o,isIndexFile:a=!1})=>{const s=gn({collectionName:t,fileName:e,valueMap:n,keyPath:r,isIndexFile:a});let l=n[r];if(l===void 0&&o?.length)return"";if(s?.widget==="datetime"&&(o?.some(u=>Mx.test(u))||(l=HP({locale:i,fieldConfig:s,currentValue:l}))),s?.widget==="relation"&&(l=hO({fieldConfig:s,valueMap:n,keyPath:r,locale:i})),s?.widget==="select"&&(l=p4({fieldConfig:s,valueMap:n,keyPath:r})),s?.widget==="list"){const{fields:u}=s,{types:d}=s;u||d||(l=Hl(i).format(Object.entries(n).filter(([f,h])=>f.match(`^${Xt(r)}\\.\\d+$`)&&typeof h=="string"&&!!h).map(([,f])=>f)))}if(s?.widget==="number"){const{value_type:u="int"}=s;(u==="int"||u==="float")&&(l=Intl.NumberFormat(jr(i)).format(Number(l)))}return Array.isArray(l)&&(l=Hl(i).format(l)),o?.length&&(l=Dx({fieldConfig:s,value:l,transformations:o})),String(l??"")},pO=({valueMap:t,locale:e,keyPath:n,keyPathRegex:r,getFieldArgs:i})=>{const o=[`${n}.title`,`${n}.name`,...Object.keys(t)].find(a=>{const s=t[a];if(!r.test(a)||!(typeof s=="string"&&s.trim()||typeof s=="number"&&!Number.isNaN(s)))return!1;const l=gn({...i,keyPath:a});return!!l&&l.widget!=="hidden"});return o?dd({...i,keyPath:o,locale:e}):""},Yf=({entry:t,locale:e,collectionName:n,key:r,resolveRef:i=!0})=>{const{slug:o,locales:a,commitAuthor:{name:s,login:l,email:u}={},commitDate:d}=t;if(r==="slug")return o;if(r==="commit_author")return s||l||u;if(r==="commit_date")return d;const{content:f}=a[e]??{};if(f===void 0)return;const h=ki(n);if(h){if(i){const p=Ea(h,t),g=gn({collectionName:n,keyPath:r,isIndexFile:p});if(g?.widget==="relation")return hO({fieldConfig:g,valueMap:f,keyPath:r,locale:e})}return f[r]}},g4=/^\/?(?<pattern>.+?)(?:\/(?<flags>[dgimsuy]*))?$/,fd=t=>{if(t instanceof RegExp)return t;if(typeof t=="string"){const{pattern:e,flags:n}=t.match(g4)?.groups??{};if(e)try{return new RegExp(e,n)}catch{}}},m4=/!\[.*?\]\((.+?)(?:\s+".*?")?\)/g,Lu=it([]),Sa=t=>{const e=ki(t);if(!e)return[];const{_type:n,_i18n:{defaultLocale:r}}=e,{filter:i}=n==="entry"?e:{},o=i?.field,a=fd(i?.pattern),s=i?.value===void 0?[]:Array.isArray(i.value)?i.value:[i.value];return oe(to).filter(l=>{if(!ls(l).some(({name:d})=>d===t))return!1;if(!o)return!0;const u=Yf({entry:l,locale:r,collectionName:t,key:o})??null;return a?a.test(u):s.includes(u)})},Hm=t=>{if(!t)return!1;const{_type:e}=t;if(e!=="entry")return!0;const{create:n=!0,limit:r=1/0}=t;return n&&Sa(t.name).length<r},BS=async({assetURL:t,newURL:e,collectionName:n,entry:r,content:i,keyPath:o,value:a,isIndexFile:s,collectionFile:l})=>{const u=l?.name,d=gn({collectionName:n,fileName:u,valueMap:i,keyPath:o,isIndexFile:s});if(!d)return!1;const f=t.startsWith("blob:"),h={entry:r,collectionName:n,fileName:u},{widget:p="string"}=d;if(["image","file"].includes(p)){const g=f?await ql({...h,value:a})===t:a===t;return g&&e&&(i[o]=e),g}if(p==="markdown"){const g=[...a.matchAll(m4)];if(g.length)return(await Promise.all(g.map(async([,m])=>{const v=(f?await ql({...h,value:m}):m)===t;return v&&e&&(i[o]=i[o].replace(m,e)),v}))).some(Boolean)}return!1},sy=async(t,{entries:e=oe(to),newURL:n=""}={})=>{const r=oe(Pt)?._baseURL,i=r&&!t.startsWith("blob:")?t.replace(r,""):t,o=await Promise.all(e.map(async a=>{const{locales:s}=a,l=ls(a);return(await Promise.all(Object.values(s).map(async({content:d})=>(await Promise.all(Object.entries(d).map(async([h,p])=>typeof p!="string"||!p?!1:(await Promise.all(l.map(async m=>{const v={assetURL:i,newURL:n,collectionName:m.name,entry:a,content:d,keyPath:h,value:p,isIndexFile:Ea(m,a)},b=Zs(m,a);return b.length?(await Promise.all(b.map(y=>BS({...v,collectionFile:y})))).includes(!0):BS({...v})}))).includes(!0)))).includes(!0)))).includes(!0)}));return e.filter((a,s)=>o[s])},v4=()=>{try{return oe(ce)("index_file")}catch{return"Index File"}},Mi=t=>{if(!Xf(t))return;const{index_file:e}=t;if(!e)return;const n=e===!0?{}:e;return{name:n.name??"_index",label:n.label??v4(),icon:n.icon??"home",fields:n.fields,editor:n.editor}},Ea=(t,e)=>{const n=Mi(t);return n?e.slug===n.name:!1},_4=t=>{const e=Mi(t);return e?!Sa(t.name).some(({slug:n})=>n===e.name):!1};function b4(t,e){let n=t.slice(0,e).split(/\r\n|\n|\r/g);return[n.length,n.pop().length+1]}function y4(t,e,n){let r=t.split(/\r\n|\n|\r/g),i="",o=(Math.log10(e+1)|0)+1;for(let a=e-1;a<=e+1;a++){let s=r[a-1];s&&(i+=a.toString().padEnd(o," "),i+=": ",i+=s,i+=`
|
|
199
199
|
`,a===e&&(i+=" ".repeat(o+n+2),i+=`^
|
|
200
200
|
`))}return i}class Nt extends Error{line;column;codeblock;constructor(e,n){const[r,i]=b4(n.toml,n.ptr),o=y4(n.toml,r,i);super(`Invalid TOML document: ${e}
|
|
201
201
|
|
|
@@ -345,54 +345,54 @@ ${a}`:o||a}function D4(t,{maxDepth:e=1e3,numbersAsFloat:n=!1}={}){if(Nh(t)!=="ob
|
|
|
345
345
|
}
|
|
346
346
|
}
|
|
347
347
|
}
|
|
348
|
-
`,V5=async(t,e)=>{if(!t.length)return{};const{isSelfHosted:n=!1}=vo,r=n?20:100,i=[...t],o=[];for(;;){const a=i.splice(0,r),s=await Xs(e,{paths:a});if(o.push(...s.project.repository.blobs.nodes),!i.length)break}return Object.fromEntries(t.map((a,s)=>[a,o[s]]))},G5=async({fetchingFiles:t,blobs:e,sizes:n={},commits:r={}})=>{const i=t.map(({path:o,sha:a})=>{const s=r[o],l={sha:a,size:Number(n[o]?.size??0),text:e[o]?.rawTextBlob??void 0,meta:{}};if(s){const{author:u,authorName:d,authorEmail:f,committedDate:h}=s,{id:p,username:g}=u??{},m=p?.match(/\d+/);l.meta={commitAuthor:{name:d,email:f,id:m?Number(m[0]):void 0,login:g},committedDate:new Date(h)}}return[o,l]});return Object.fromEntries(i)},W5=async t=>{fa.set(0);const e=window.setInterval(()=>{fa.update((i=0)=>i+1)},t.length/10),n=t.filter(({type:i})=>i!=="asset").map(({path:i})=>i),r=await V5(n,K5);return window.clearInterval(e),fa.set(void 0),G5({fetchingFiles:t,blobs:r})},Y5=async()=>{await D5(),await d0({repository:vo,fetchDefaultBranchName:z5,fetchLastCommit:U5,fetchFileList:H5,fetchFileContents:W5})},J5=async t=>{const{owner:e,repo:n,branch:r=""}=vo,{path:i}=t;return dr(`/projects/${encodeURIComponent(`${e}/${n}`)}/repository/files/${encodeURIComponent(i)}/raw?lfs=true&ref=${encodeURIComponent(r)}`,{responseType:"blob"})},X5="https://status.gitlab.com/",Z5="https://status-api.hostedstatus.com/1.0/status/5b36dc6502d06804c08349f7",Q5=async()=>{try{const{result:{status_overall:{status_code:t}}}=await Rh(Z5);if(t===100)return"none";if([200,300,400].includes(t))return"minor";if([500,600].includes(t))return"major"}catch{}return"unknown"},e8=()=>{const{backend:t}=oe(Pt)??{};if(t?.name!==kf)return;const{repo:e,branch:n,base_url:r=O5,auth_endpoint:i=L5,app_id:o="",api_root:a=XS,graphql_api_root:s=a.replace(/\/api\/.+$/,"/api/graphql")}=t,{owner:l,repo:u}=e.match(/(?<owner>.+)\/(?<repo>[^/]+)$/)?.groups??{},d=`${l}/${u}`,f=`${on(r)}/${on(i)}`,h=c0(a,d);return Object.assign(vo,{service:kf,label:qO,owner:l,repo:u,branch:n,repoURL:h,newPatURL:N5(h),databaseName:`${kf}:${d}`,isSelfHosted:a!==XS},HO(h,n)),Object.assign(gc,{clientId:o,authScope:"api",authURL:f,tokenURL:f.replace("/authorize","/token"),authScheme:"Bearer",restBaseURL:on(a),graphqlBaseURL:on(s)}),Object.assign(Mh,{fullPath:d,branch:n}),oe(ht).devModeEnabled&&console.info("repositoryInfo",vo),vo},t8={isGit:!0,name:kf,label:qO,repository:vo,statusDashboardURL:X5,checkStatus:Q5,init:e8,signIn:R5,signOut:M5,fetchFiles:Y5,fetchBlob:J5,commitChanges:B5},Dh={github:P5,gitlab:t8,gitea:r5,local:gq,"test-repo":kq},n8=Object.keys(Dh).filter(t=>t!=="local"),r8=Object.fromEntries(Object.entries(Dh).filter(([,t])=>t.isGit)),mc=it(),Cn=sn([mc],([t],e,n)=>{n(r=>{const i=t?Dh[t]:void 0;return i&&i!==r&&i.init(),i})}),Pg=it(!0);wr.extend(Tx);wr.extend($x);wr.extend(Ax);const i8=/{{(?:year|month|day|hour|minute|second)}}/,ls=t=>$P(Object.values(t.locales)[0].path).map(({collectionName:e})=>ki(e)).filter(e=>!!e),o8=({dateFieldName:t,fields:e,content:n})=>{const r=t?e.find(({widget:s,name:l})=>s==="datetime"&&l===t):e.find(({widget:s})=>s==="datetime"),i=r?n[r.name]:void 0;if(!r||!i)return;const{format:o,picker_utc:a=!1}=r;return jl({date:(a?wr.utc:wr)(i,o).toDate(),timeZone:a?"UTC":void 0})},KO=(t,e,n,r)=>{const{show_preview_links:i=!0,_baseURL:o}=oe(Pt)??{},{slug:a,path:s,content:l}=t.locales[e]??{},{preview_path:u,preview_path_date_field:d,fields:f=[]}=r??n;if(!i||!o||!s||!l||!u)return;const h=Ea(n,t),g=(h?Mi(n):void 0)?.fields??f;let m;if(!(i8.test(u)&&(m=o8({dateFieldName:d,fields:g,content:l}),!m)))try{const v=la(u,{type:"preview_path",collection:n,content:l,locale:e,currentSlug:a,entryFilePath:s,dateTimeParts:m,isIndexFile:h});return`${o.replace(/\/$/,"")}/${v.replace(/^\//,"")}`}catch{return}},a8=(t,e)=>`${oe(Cn)?.repository?.blobBaseURL}/${t.locales[e]?.path}?plain=1`,Gm=t=>!("divider"in t)&&typeof t.file=="string"&&Array.isArray(t.fields),Wm=t=>t.filter(e=>Gm(e)),pd=(t,e)=>{const n=typeof t=="string"?ki(t):t;if(!(!n||!("_fileMap"in n)))return n._fileMap[e]},Fh=t=>t.label||t.name,Zs=(t,e)=>"_fileMap"in t?Object.values(t._fileMap).filter(({_file:n,_i18n:r})=>n.fullPath===e.locales[r.defaultLocale]?.path):[],f0=(t,e)=>oe(to).find(n=>ls(n).some(r=>r.name===t&&Zs(r,n).some(i=>i.name===e))),ZS=(t,e)=>{if(t&&e){const{collections:n,singletons:r}=oe(Pt);if(t==="_singletons")return Array.isArray(r)?Wm(r).findIndex(o=>o.name===e):-1;const i=Qs({collections:n}).find(({name:o})=>o===t);if(i&&"files"in i)return i.files.findIndex(({name:o})=>o===e)}return-1},xs={SINGLE_FILE:"single_file",MULTIPLE_FILES:"multiple_files",MULTIPLE_FOLDERS:"multiple_folders",MULTIPLE_FOLDERS_I18N_ROOT:"multiple_folders_i18n_root"},Sf="_default",py={key:"translationKey",value:"{{slug}}"},Go={i18nEnabled:!1,saveAllLocales:!0,allLocales:[Sf],initialLocales:[Sf],defaultLocale:Sf,structure:xs.SINGLE_FILE,structureMap:{i18nSingleFile:!1,i18nMultiFile:!1,i18nMultiFolder:!1,i18nRootMultiFolder:!1},canonicalSlug:{...py},omitDefaultLocaleFromFileName:!1},s8=(t,e)=>{const n=oe(Pt);if(!$t(n.i18n))return;const r=structuredClone(n.i18n);if(t.i18n||h0(t)){if($t(t.i18n)&&Object.assign(r,t.i18n),e)if(e.i18n)$t(e.i18n)&&Object.assign(r,e.i18n);else return}else return;return r},l8=(t,e)=>e?e.file.includes("{{locale}}")?xs.MULTIPLE_FILES:xs.SINGLE_FILE:t,c8=(t,e)=>({i18nSingleFile:t&&e===xs.SINGLE_FILE,i18nMultiFile:t&&e===xs.MULTIPLE_FILES,i18nMultiFolder:t&&e===xs.MULTIPLE_FOLDERS,i18nRootMultiFolder:t&&e===xs.MULTIPLE_FOLDERS_I18N_ROOT}),u8=(t,e,n)=>t?n&&e.includes(n)?n:e[0]:Sf,d8=(t,e,n)=>t==="all"?e:t==="default"?[n]:e.filter(r=>r===n||(Array.isArray(t)?t.includes(r):!0)),zh=(t,e)=>{const n=s8(t,e),{structure:r=xs.SINGLE_FILE,locales:i=[],default_locale:o,initial_locales:a,save_all_locales:s=!0,canonical_slug:l={key:void 0,value:void 0},omit_default_locale_from_filename:u=!1}=n??{};n?.save_all_locales!==void 0&&Km("save_all_locales");const{key:d=py.key,value:f=py.value}=l,h=i.length>0,p=h?i:[Sf],g=u8(h,p,o),m=l8(r,e),v=c8(h,m),b=h?s===!0&&a===void 0:!0,y=d8(a,p,g),w=u&&(e?/\.{{locale}}\.[a-zA-Z0-9]+$/.test(e.file):v.i18nMultiFile);return{i18nEnabled:h,saveAllLocales:b,allLocales:p,defaultLocale:g,initialLocales:y,structure:m,structureMap:v,canonicalSlug:{key:d,value:f},omitDefaultLocaleFromFileName:w}},tr=it(),Ud=new Map,Xf=t=>typeof t.folder=="string"&&!Array.isArray(t.files),Og=t=>t.folder===void 0&&Array.isArray(t.files),h0=t=>Og(t)&&t.name==="_singletons",f8=(t,{visible:e=void 0,type:n=void 0}={})=>"divider"in t||e&&t.hide?!1:n==="entry"?Xf(t):n==="file"?Og(t):n==="singleton"?h0(t):Xf(t)||Og(t),Qs=({collections:t=oe(Pt)?.collections??[],visible:e,type:n}={})=>t.filter(r=>f8(r,{visible:e,type:n})),h8=()=>Qs({visible:!0})[0],p8=t=>{if(!("folder"in t))return[];const{fields:e,thumbnail:n=!0}=t;return n===!1?[]:typeof n=="string"?[n]:Array.isArray(n)?n:e?.length?e.filter(({widget:r="string"})=>["image","file"].includes(r)).map(({name:r})=>r):[]},g8=(t,e)=>({...t,_i18n:e,_type:"entry",_file:yO({rawCollection:t,_i18n:e}),_thumbnailFieldNames:p8(t)}),VO=(t,e,n)=>({...t,_i18n:e,_type:h0(t)?"singleton":"file",_fileMap:Object.fromEntries(n.filter(Gm).map(r=>{const i=zh(t,r),o=yO({rawCollection:t,file:r,_i18n:i});return[r.name,{...r,_file:o,_i18n:i}]}))}),GO=()=>{const t=oe(Pt)?.singletons;if(!Array.isArray(t))return;const e=Wm(t).map(i=>({...i,file:on(i.file)}));if(!e.length)return;const n={name:"_singletons",files:e},r=zh(n);return VO(n,r,e)},ki=t=>{const e=Ud.get(t);if(e)return e;if(t==="_singletons"){const s=GO();return Ud.set(t,s),s}const n=Qs().find(s=>s.name===t);if(!n){Ud.set(t,void 0);return}const r=Xf(n)?n:void 0,i=Og(n)?n:void 0;if(!r&&!i){Ud.set(t,void 0);return}r?r.folder=on(r.folder):i?.files.forEach(s=>{s.file&&(s.file=on(s.file))});const o=zh(n),a=r?g8(r,o):i?VO(i,o,i.files):void 0;return Ud.set(t,a),a},Za=(t,{useSingular:e=!1}={})=>{const{_type:n,name:r,label:i,label_singular:o}=t;return n==="singleton"?oe(ce)("files"):e&&o?o:i||r},QS=t=>t?t==="_singletons"?9999999:oe(Pt)?.collections?.findIndex(({name:e})=>e===t)??-1:-1,Qp=[],eE=t=>t.includes("{{media_folder}}")||t.includes("{{public_folder}}"),tE=(t,{globalMediaFolder:e,globalPublicFolder:n})=>t.trim().replace("{{media_folder}}",`/${e}`).replace("{{public_folder}}",`/${n}`).replace("//","/"),m8=({collectionName:t,fileName:e,typedKeyPath:n,isIndexFile:r=!1,mediaFolder:i,publicFolder:o,baseFolder:a,globalFolders:s})=>{if(eE(i)){if(!s)return;i=tE(i,s)}if(o===void 0)o=i;else if(eE(o)){if(!s)return;o=tE(o,s)}const l=!i.startsWith("/");return{collectionName:t,fileName:e,typedKeyPath:n,isIndexFile:r,internalPath:on(l?a??"":i),internalSubPath:l?on(i):void 0,publicPath:o===""||/^[.@]/.test(o)?o:`/${on(o)}`,entryRelative:l,hasTemplateTags:/{{.+?}}/.test(i)}},p0=t=>{if(t.mediaFolder===void 0)return;const e=m8(t);if(!e)return;const{globalMediaFolder:n,globalPublicFolder:r}=t.globalFolders??{};!e.entryRelative&&e.internalPath===n&&e.publicPath===r||Qp.push(e)},nE=({collectionName:t,files:e,globalFolders:n})=>{Wm(e).forEach(r=>{const{name:i,file:o,media_folder:a,public_folder:s}=r;p0({collectionName:t,fileName:i,mediaFolder:a,publicFolder:s,baseFolder:pn(o).dirname,globalFolders:n})})},v8=({fieldMediaFolders:t,validCollections:e,globalFolders:n})=>{t.forEach(({fieldConfig:r,context:i})=>{const o=i.collection;(o.name==="_singletons"||e.some(s=>s.name===o.name))&&p0({collectionName:o.name,fileName:i.collectionFile?.name,mediaFolder:r.media_folder,publicFolder:r.public_folder,baseFolder:"folder"in o?o.folder:void 0,typedKeyPath:i.typedKeyPath,isIndexFile:i.isIndexFile,globalFolders:n})})},_8=(t,e=[])=>{Qp.length=0;const{media_folder:n,public_folder:r,collections:i,singletons:o}=t,a=!!n,s=a?on(n).replace(/^\.$/,""):"",l=a?r?`/${on(r)}`.replace(/^\/@/,"@"):`/${s}`:"",u={collectionName:void 0,internalPath:void 0,internalSubPath:void 0,publicPath:void 0,entryRelative:!1,hasTemplateTags:!1},d=a?{...u,internalPath:s,publicPath:l}:void 0,f=a?{globalMediaFolder:s,globalPublicFolder:l}:void 0,h=Qs({collections:i});h.forEach(g=>{const{name:m,files:v,folder:b,path:y,media_folder:w,public_folder:x}=g;p0({collectionName:m,mediaFolder:w===void 0&&y!==void 0?"":w,publicFolder:x,baseFolder:b,globalFolders:f}),v?.length&&nE({collectionName:m,files:v,globalFolders:f})}),o?.length&&nE({collectionName:"_singletons",files:o,globalFolders:f}),v8({fieldMediaFolders:e,validCollections:h,globalFolders:f}),Qp.sort((g,m)=>eo(g.internalPath??"",m.internalPath??""));const p=[];return d&&p.push(d),p.push(...Qp),p.length&&p.unshift(u),p},b8=({collection:t,file:e})=>{const n=on(e.file);if(!n.includes("{{locale}}"))return{_default:n};const r=zh(t,e);return Object.fromEntries(r.allLocales.map(i=>[i,Rx({_i18n:r,locale:i,path:n})]))},WO=(t,e)=>{if(Gm(e))return{collectionName:t.name,fileName:e.name,filePathMap:b8({collection:t,file:e})}},YO=(t,e)=>eo(Object.values(t.filePathMap??{})[0],Object.values(e.filePathMap??{})[0]),y8=({collections:t})=>Qs({collections:t,type:"entry",visible:!0}).map(e=>{const{name:n,folder:r}=e,i=on(r),{allLocales:o,structureMap:{i18nRootMultiFolder:a}}=zh(e);return{collectionName:n,folderPath:i,folderPathMap:Object.fromEntries(o.map(s=>[s,a?`${s}/${i}`:i]))}}).sort((e,n)=>eo(e.folderPath??"",n.folderPath??"")),w8=({collections:t})=>Qs({collections:t,type:"file",visible:!0}).map(e=>(e.files??[]).map(n=>WO(e,n))).flat(1).filter(e=>!!e).sort(YO),x8=({singletons:t})=>{const e=Array.isArray(t)?Wm(t):[];if(!e.length)return[];const n={name:"_singletons",files:e};return e.map(r=>WO(n,r)).filter(r=>!!r).sort(YO)},k8=t=>[...y8(t),...w8(t),...x8(t)],S8=["text/yaml","application/yaml","application/toml","application/json"],E8=async({href:t,type:e="application/yaml"})=>{let n;if(!S8.includes(e))throw new Error(oe(ce)("config.error.parse_failed"),{cause:new Error(oe(ce)("config.error.parse_failed_unsupported_type"))});try{n=await fetch(t)}catch(a){throw new Error(oe(ce)("config.error.fetch_failed"),{cause:a})}const{ok:r,status:i}=n;if(!r)throw new Error(oe(ce)("config.error.fetch_failed"),{cause:new Error(oe(ce)("config.error.fetch_failed_not_ok",{values:{status:i}}))});let o;try{if(e==="application/json")o=await n.json();else{const a=await n.text();e==="application/toml"?o=r0(a):o=i0(a,{merge:!0,maxAliasCount:-1})}}catch(a){throw new Error(oe(ce)("config.error.parse_failed"),{cause:a})}if(!$t(o))throw new Error(oe(ce)("config.error.parse_failed"),{cause:new Error(oe(ce)("config.error.parse_failed_invalid_object"))});return o},T8=t=>{if(t.endsWith("/"))return`${t}config.yml`;const e=t.split("/");return e.pop()?.includes(".")?`${e.join("/")}/config.yml`:`${t}/config.yml`},rE=async()=>{const t=[...document.querySelectorAll('link[rel="cms-config-url"]')].map(({href:n,type:r})=>({href:n,type:r}));t.length||t.push({href:T8(window.location.pathname)});const e=await Promise.all(t.map(n=>E8(n)));return e.length===1?e[0]:ix.all(e)},Jr=({type:t="error",strKey:e,values:n={},context:r={},collectors:i})=>{const{collection:o,collectionFile:a,typedKeyPath:s}=r,{errors:l,warnings:u}=i,d=oe(ce),f=[];o&&f.push(d("config.error_locator.collection",{values:{collection:o.label_singular??o.label??o.name}})),a&&f.push(d("config.error_locator.file",{values:{file:a.label??a.name}})),s&&f.push(d("config.error_locator.field",{values:{field:s}}));const h=t==="error"?l:u,p=oe(Bt),g=f.length?`${Hl(p).format(f)}: `:"",m=d(`config.${t}.${e}`,{values:n});h.add(`${g}${m}`)},el=({UNSUPPORTED_OPTIONS:t,config:e,context:n,collectors:r})=>{t.forEach(({type:i="error",prop:o,newProp:a,value:s,strKey:l="unsupported_deprecated_option"})=>{o in e&&(s===void 0||e[o]===s)&&Jr({type:i,strKey:l,values:{prop:o,newProp:a},context:n,collectors:r})})},$8=/^[^\s.*:<>]+$/,A8=t=>$8.test(t),jh=({name:t,index:e,nameCounts:n,strKeyBase:r,context:i,collectors:o})=>{if(!t||typeof t!="string"){const a=String(e+1);return Jr({strKey:`missing_${r}`,context:i,values:{count:a},collectors:o}),!1}return A8(t)?n[t]===1?(Jr({strKey:`duplicate_${r}`,context:i,values:{name:t},collectors:o}),!1):(n[t]=(n[t]??0)+1,!0):(Jr({strKey:`invalid_${r}`,context:i,values:{name:t},collectors:o}),!1)},C8=[{type:"warning",prop:"use_graphql",strKey:"unsupported_ignored_option"},{type:"warning",prop:"open_authoring",strKey:"open_authoring_unsupported"}],P8=(t,e)=>{const{backend:n}=t,{errors:r}=e;if(!$t(n)){r.add(oe(ce)("config.error.missing_backend"));return}const{name:i}=n;if(!i){r.add(oe(ce)("config.error.missing_backend_name"));return}if(!n8.includes(i)){r.add(oe(ce)("config.error.unsupported_backend",{values:{name:i}}));return}if(Object.keys(r8).includes(i)){const{repo:o,automatic_deployments:a,auth_type:s,app_id:l}=n;o===void 0&&r.add(oe(ce)("config.error.missing_repository")),(typeof o!="string"||!/(.+)\/([^/]+)$/.test(o))&&r.add(oe(ce)("config.error.invalid_repository")),s==="implicit"&&r.add(oe(ce)("config.error.oauth_implicit_flow")),(i==="gitea"||s==="pkce")&&!l&&r.add(oe(ce)("config.error.oauth_no_app_id")),a!==void 0&&Km("automatic_deployments"),el({UNSUPPORTED_OPTIONS:C8,config:n,context:{},collectors:e})}},JO=(t,e)=>{if(!t||!e)return!1;const n=t==="yml"?"yaml":t,r=e==="yml"?"yaml":e;if(n==="md"||n==="markdown"||n==="mdx")return!(r==="frontmatter"||r.endsWith("-frontmatter"));if(r.endsWith("-frontmatter")){const o=r.replace("-frontmatter","");return n!==o}if(r==="frontmatter")return!0;const i=["yaml","toml","json"];return i.includes(r)?i.includes(n)&&n!==r:!1},O8=[{prop:"dateFormat",newProp:"date_format"},{prop:"timeFormat",newProp:"time_format"},{prop:"pickerUtc",newProp:"picker_utc"}],L8=t=>{el({...t,UNSUPPORTED_OPTIONS:O8})},I8=[{prop:"allow_multiple",newProp:"multiple",strKey:"allow_multiple"}],iE=t=>{const{config:e,context:n,collectors:r}=t,{media_folder:i}=e;i!==void 0&&r.mediaFields.add({fieldConfig:e,context:n}),el({...t,UNSUPPORTED_OPTIONS:I8})},N8=t=>{const{config:e,context:n,collectors:r}=t,{field:i}=e,{fields:o}=e,{types:a}=e,{typedKeyPath:s}=n,l={nameCounts:{},strKeyBase:"variable_type",collectors:r};if(i&&o||i&&a||o&&a){Jr({strKey:"invalid_list_field",context:n,collectors:r});return}i&&XO({config:i,context:{...n,typedKeyPath:`${s}.*`},collectors:r}),o&&Vl(o,{...n,typedKeyPath:`${s}.*`},r),a?.forEach(({name:u,fields:d},f)=>{const h={...n,typedKeyPath:`${s}.*<${u}>`};jh({...l,name:u,index:f,context:h})&&d&&Vl(d,h,r)})},R8=[{prop:"editorComponents",newProp:"editor_components"}],M8=t=>{el({...t,UNSUPPORTED_OPTIONS:R8})},D8=[{prop:"valueType",newProp:"value_type"}],F8=t=>{el({...t,UNSUPPORTED_OPTIONS:D8})},z8=t=>{const{config:e,context:n,collectors:r}=t,{fields:i}=e,{types:o}=e,{typedKeyPath:a}=n,s={nameCounts:{},strKeyBase:"variable_type",collectors:r};if(i&&o){Jr({strKey:"invalid_object_field",context:n,collectors:r});return}if(!i&&!o){Jr({strKey:"object_field_missing_fields",context:n,collectors:r});return}i&&Vl(i,n,r),o?.forEach(({name:l,fields:u},d)=>{const f={...n,typedKeyPath:`${a}<${l}>`};jh({...s,name:l,index:d,context:f})&&u&&Vl(u,f,r)})},j8=[{prop:"displayFields",newProp:"display_fields"},{prop:"searchFields",newProp:"search_fields"},{prop:"valueField",newProp:"value_field"},{type:"warning",prop:"options_length",strKey:"unsupported_ignored_option"}],U8=t=>{const{config:e,context:n,collectors:r}=t,i=e,{collection:o,file:a,value_field:s}=i,{cmsConfig:l}=n,u=o==="_singletons"?{files:l?.singletons}:l?.collections?.find(f=>f.name===o);let d;if(u){const f="files"in u&&Array.isArray(u.files);a?(f&&(d=u.files.find(h=>"file"in h&&h.name===a)),d||Jr({strKey:"relation_field_invalid_collection_file",context:n,collectors:r,values:{file:a}})):f&&Jr({strKey:"relation_field_missing_file_name",context:n,collectors:r,values:{collection:o}})}else Jr({strKey:"relation_field_invalid_collection",context:n,collectors:r,values:{collection:o}});el({...t,UNSUPPORTED_OPTIONS:j8}),r.relationFields.add({fieldConfig:i,context:n})},B8={datetime:L8,file:iE,image:iE,list:N8,markdown:M8,number:F8,object:z8,relation:U8},XO=t=>{const{config:e,context:n}=t,{name:r,widget:i="string"}=e,{typedKeyPath:o}=n,a={...t,context:{...n,typedKeyPath:o?`${o}.${r}`:r}};B8[i]?.(a),i==="date"&&Jr({...a,strKey:"date_widget"})},Vl=(t,e,n)=>{const r={nameCounts:{},strKeyBase:"field_name",context:e,collectors:n};t?.forEach((i,o)=>{const{name:a}=i;jh({...r,name:a,index:o})&&XO({config:i,context:e,collectors:n})})},q8=(t,e)=>{const{collection:n,collectionFile:r}=t,{file:i,format:o=n.format,fields:a}=r,{extension:s}=pn(i);JO(s,o)&&Jr({strKey:"file_format_mismatch",context:t,values:{extension:s,format:o},collectors:e}),Vl(a,t,e)},ZO=(t,e)=>{const{cmsConfig:n,collection:r}=t,{files:i}=r,o={nameCounts:{},strKeyBase:"collection_file_name",collectors:e};i.forEach((a,s)=>{if("divider"in a)return;const{name:l}=a,u={cmsConfig:n,collection:r,collectionFile:a};jh({...o,name:l,index:s,context:u})&&q8(u,e)})},H8=[{type:"warning",prop:"nested",strKey:"nested_collections_unsupported"},{prop:"sortableFields",newProp:"sortable_fields"}],K8=(t,e)=>{const{cmsConfig:n,collection:r}=t,{extension:i,format:o,fields:a,index_file:s,slug:l}=r;JO(i,o)&&Jr({strKey:"file_format_mismatch",values:{extension:i,format:o},context:t,collectors:e}),el({UNSUPPORTED_OPTIONS:H8,config:r,context:t,collectors:e}),Vl(a,t,e),s&&Vl(s===!0?a:s.fields??a,{cmsConfig:n,collection:r,isIndexFile:!0},e),l?.includes("/")&&Jr({strKey:"invalid_slug_slash",values:{slug:l},context:t,collectors:e})},V8=({cmsConfig:t,collection:e},n)=>{const r="divider"in e,i="files"in e,o="folder"in e;if(!r&&!i&&!o){Jr({strKey:"invalid_collection_no_options",context:{collection:e},collectors:n});return}if(r&&i||r&&o||i&&o){Jr({strKey:"invalid_collection_multiple_options",context:{collection:e},collectors:n});return}i?ZO({cmsConfig:t,collection:e},n):o&&K8({cmsConfig:t,collection:e},n)},G8=(t,e)=>{const{collections:n,singletons:r}=t,{errors:i}=e,o=oe(ce);if(!Array.isArray(n)&&!Array.isArray(r)){i.add(o("config.error.no_collection"));return}const a={nameCounts:{},strKeyBase:"collection_name",collectors:e};if(n?.forEach((s,l)=>{if("divider"in s)return;const{name:u}=s,d={cmsConfig:t,collection:s};jh({...a,name:u,index:l,context:d})&&V8(d,e)}),Array.isArray(r)){const s={name:"_singletons",label:o("singletons"),label_singular:o("singleton"),files:r};ZO({cmsConfig:t,collection:s},e)}},oE=["cloudinary","uploadcare"],QO=({libraryName:t="default",fieldConfig:e}={})=>{const n=oe(Pt);if(e?.media_libraries?.[t])return e.media_libraries[t];if(e?.media_library){const r=n?.media_library?.name??"default",i=e.media_library,o=i.name;if(r===t&&(o===t||o===void 0))return i}return n?.media_libraries?.[t]?n.media_libraries[t]:n?.media_library?.name===t?n.media_library:{}},W8=(t,e)=>{const{media_folder:n,public_folder:r,media_library:i,media_libraries:o}=t,{errors:a}=e;n===void 0?!oE.includes(i?.name??"")&&!Object.keys(o||{}).some(s=>oE.includes(s))&&a.add(oe(ce)("config.error.missing_media_folder")):typeof n!="string"&&a.add(oe(ce)("config.error.invalid_media_folder")),r!==void 0&&(typeof r!="string"?a.add(oe(ce)("config.error.invalid_public_folder")):(/^\.{1,2}\//.test(r)&&a.add(oe(ce)("config.error.public_folder_relative_path")),/^https?:/.test(r)&&a.add(oe(ce)("config.error.public_folder_absolute_url"))))},Y8=[{type:"warning",prop:"publish_mode",value:"editorial_workflow",strKey:"editorial_workflow_unsupported"},{type:"warning",prop:"local_backend",strKey:"unsupported_ignored_option"},{type:"warning",prop:"locale",strKey:"unsupported_ignored_option"},{type:"warning",prop:"search",strKey:"unsupported_ignored_option"}],J8=(t,e)=>{P8(t,e),W8(t,e),G8(t,e),el({UNSUPPORTED_OPTIONS:Y8,config:t,context:{},collectors:e})},X8={DEV:!1},{DEV:Z8}=X8,Q8=void 0,eL={},Pt=it(),g0=it(),gy=it([]),Zo={errors:new Set,warnings:new Set,mediaFields:new Set,relationFields:new Set},e6=async t=>{Pt.set(void 0),gy.set([]),Object.assign(Zo,{errors:new Set,warnings:new Set,mediaFields:new Set,relationFields:new Set});try{if(!window.isSecureContext)throw new Error(oe(ce)("config.error.no_secure_context"));let e;if(t){if(!$t(t))throw new Error(oe(ce)("config.error.parse_failed"));e=t,e.load_config_file!==!1&&(e=ix(await rE(),e))}else e=await rE();if(Object.assign(eL,e),J8(e,Zo),Zo.errors.size)throw Zo.errors.forEach(r=>{console.error(r)}),new Error("Errors found in configuration");Zo.warnings.size&&Zo.warnings.forEach(r=>{console.warn(r)});const n=structuredClone(e);n._siteURL=n.site_url?.trim()||(Z8?Q8:window.location.origin),n._baseURL=Sh(n._siteURL)?new URL(n._siteURL).origin:"",n.collections?.forEach(r=>{"folder"in r&&(r.folder==="."||r.folder==="/")&&(r.folder="")}),Pt.set(n),g0.set(await zl(kx(n)))}catch(e){gy.set(Zo.errors.size?[...Zo.errors]:[e.name==="Error"?e.message:oe(ce)("config.error.unexpected")]),console.error(e,e.cause)}};Pt.subscribe(t=>{if(oe(ht).devModeEnabled&&(console.info("cmsConfig",t),console.info("collectors",Zo)),!t)return;const e=k8(t),n=_8(t,[...Zo.mediaFields]);Sx.set(e),Ws.set(n),oe(ht).devModeEnabled&&(console.info("allEntryFolders",e),console.info("allAssetFolders",n))});const tL=(t,{fallback:e=!0}={})=>{const{slug:{encoding:n="unicode",clean_accents:r=!1,sanitize_replacement:i="-",trim:o=!0}={}}=oe(Pt)??{};let a=t;if(r&&(a=g3(a.normalize("NFD"))),n==="ascii"?a=a.replaceAll(/[^\w-~]/g," "):a=a.replaceAll(/[\p{Z}\p{C}!"#$&'()*+,/:;<=>?@[\]^`{|}]/gu," "),a=a.toLocaleLowerCase().trim().replaceAll(/\s+/g,i),i){const s=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),l=new RegExp(`${s}+`,"g");a=a.replace(l,i),o&&(a=a.replace(new RegExp(`^${s}+|${s}+$`,"g"),""))}return!a&&e?Vi("short"):a},t6=["year","month","day","hour","minute","second"],n6=/{{(.+?)}}(?!'\))/g,r6={uuid:()=>Vi(),uuid_short:()=>Vi("short"),uuid_shorter:()=>Vi("shorter")},i6=(t,e)=>t6.includes(t)?e[t]:void 0,o6=t=>{const e=r6[t];return e?e():void 0},a6=(t,e,n,r)=>{if(!(t!=="slug"||!e))return n==="preview_path"&&r?"":e},s6=(t,e,n)=>{if(!e)return"";switch(t){case"dirname":{const r=e.replace(n??"",""),i=r.lastIndexOf("/");return i>0?r.substring(0,i):""}case"filename":return e.split("/").pop().split(".").shift();case"extension":return e.split("/").pop().split(".").pop();default:return}},l6=(t,e,n)=>t.startsWith("fields.")?e[t.replace(/^fields\./,"")]:t==="slug"?Ou(e,{identifierField:n}):e[t],nL=(t,e)=>{const{type:n,content:r,currentSlug:i,entryFilePath:o,locale:a,dateTimeParts:s=jl({timeZone:"UTC"}),identifierField:l,basePath:u,isIndexFile:d=!1}=e,f=i6(t,s);if(f!==void 0)return f;const h=a6(t,i,n??"",d);if(h!==void 0)return h;const p=o6(t);if(p!==void 0)return p;if(n==="preview_path"&&t==="locale")return a;if(n==="preview_path"||n==="media_folder"){const g=s6(t,o,u);if(g!==void 0)return g}return l6(t,r,l)},c6=(t,e)=>{let n=!1;return t.forEach((r,i)=>{const{defaultValue:o}=r.match(KP)?.groups??{};if(o!==void 0){n=!0;const{innerTag:a}=o.match(/^{{(?<innerTag>.+?)}}$/)?.groups??{};a!==void 0&&(t[i]=`default('${nL(a,e)??""}')`)}}),{transformations:t,hasDefaultTransformation:n}},u6=(t,{replaceSubContext:e,getFieldArgs:n})=>{const[r,...i]=t.split(/\s*\|\s*/);let o=nL(r,e);const{transformations:a,hasDefaultTransformation:s}=c6(i,e);return o===void 0&&!s?Vi("short"):(a.length&&(o=Dx({fieldConfig:gn({...n,keyPath:r}),value:o,transformations:a})),e.type?String(o):tL(String(o)))},d6=(t,e)=>Sa(t).map(n=>e?n.locales[e]?.slug:n.slug).filter(Boolean),la=(t,e)=>{const{collection:n,content:r,currentSlug:i,locale:o,isIndexFile:a=!1}=e,{_type:s,name:l}=n,{identifier_field:u="title",slug_length:d=void 0,_file:{basePath:f}={}}=s==="entry"?n:{},h={replaceSubContext:{...e,identifierField:u,basePath:f},getFieldArgs:{collectionName:l,keyPath:"",valueMap:r,isIndexFile:a}};let p=t.replace(n6,(g,m)=>u6(m,h)).trim();return typeof d=="number"&&(p=_2(p,d,{ellipsis:""}).replace(/-$/,"")),i?p:MP(p,d6(l,o))},Uh=({fieldConfig:t}={})=>{const e=QO({fieldConfig:t}),{max_file_size:n,multiple:r,slugify_filename:i,transformations:o}=typeof e=="boolean"?{}:e?.config??{};return{config:{max_file_size:typeof n=="number"&&Number.isInteger(n)?n:1/0,multiple:typeof r=="boolean"?r:!1,slugify_filename:typeof i=="boolean"?i:!1,transformations:$t(o)?o:void 0}}},rL=async(t,e)=>{const[n,r]=t.type.split("/");if(n==="image"&&r!=="svg+xml"){let i;if(r in e?i=e[r]:"raster_image"in e&&FP.includes(r)&&(i=e.raster_image),i){const{format:o,quality:a,width:s,height:l}=i,u=o&&zP.includes(o)?o:"webp",d=await Ix(t,{format:u,quality:a&&Number.isSafeInteger(a)?a:85,width:s&&Number.isSafeInteger(s)?s:void 0,height:l&&Number.isSafeInteger(l)?l:void 0}),f=d.type===`image/${u}`?ey.test(t.name)?t.name.replace(ey,u):t.name.concat(u):t.name;return new File([d],f,{type:d.type})}}return n==="image"&&r==="svg+xml"&&e.svg?.optimize?new File([await UU(t)],t.name,{type:t.type}):t},Wn=it([]),Zf=it([]),ba=it(),zs=it(),Oo=it({folder:void 0,files:[]}),my=it(),eg=it(),f6=sn([Oo],([t],e,n)=>{e({processing:!1,undersizedFiles:[],oversizedFiles:[],transformedFileMap:new WeakMap});const r=t.files,i=new WeakMap,{max_file_size:o,transformations:a}=Uh().config;let s=[];(async()=>(r.length&&a?(n(l=>({...l,processing:!0})),s=await Promise.all(r.map(async l=>{const u=await rL(l,a);return u!==l&&i.set(u,l),u}))):s=[...r],n(()=>({processing:!1,undersizedFiles:s.filter(({size:l})=>l<=o),oversizedFiles:s.filter(({size:l})=>l>o),transformedFileMap:i}))))()}),aE=({path:t,entry:e,collection:n,file:r})=>{const{locales:i}=e,{media_folder:o,_i18n:{defaultLocale:a}}=r??n,s=a in i?a:Object.keys(i)[0],{path:l,content:u}=i[s];if(!l||!u)return;const{entryFolder:d}=l.match(/(?<entryFolder>.+?)(?:\/[^/]+)?$/)?.groups??{},f=Zb(Au([d,o,t]));return oe(Wn).find(h=>h.path===f)},h6=({path:t,entry:e})=>e?ls(e).map(r=>{const i=Zs(r,e),o={path:t,entry:e,collection:r};return i.length?i.map(a=>aE({...o,file:a})):aE({...o})}).flat(1).filter(Boolean)[0]??oe(Wn).find(r=>r.path===t):void 0,p6=({path:t,entry:e,collectionName:n,fileName:r})=>{const i=oe(Wn).find(u=>u.path===on(t));if(i)return i;const{dirname:o="",basename:a}=pn(t);let s;return[da({collectionName:n,fileName:r}),da({collectionName:n}),oe(ed),oe(Ws).findLast(u=>o.match(`^${(u.publicPath??"").replace(/{{.+?}}/g,".+?")}\\b`))].filter(u=>!!u).find(u=>{const{publicPath:d,collectionName:f}=u;let{internalPath:h}=u;if(h!==void 0&&/{{.+?}}/.test(h)){const m=f?ki(f):e?ls(e)?.[0]:void 0;if(!(e&&m))return!1;const{content:v,path:b}=e.locales[m._i18n.defaultLocale];h=la(h,{type:"media_folder",collection:m,content:Pi(v),currentSlug:e.slug,entryFilePath:b,isIndexFile:Ea(m,e)})}d&&h&&o&&o.startsWith(`${d}/`)&&(h=o.replace(d,h));const p=Au([h,a]),g=oe(Wn).find(m=>m.path===p);return g&&(s=g),!!g}),s},m0=({value:t,entry:e,collectionName:n,fileName:r})=>{const i=SU(t.split("#")[0]);return/^[/@]/.test(i)?p6({path:i,entry:e,collectionName:n,fileName:r}):h6({path:i,entry:e})},g6=t=>oe(Wn).filter(e=>fn(e.folder,t)),v0=t=>oe(Wn).filter(e=>pn(e.path).dirname===t);Po.subscribe(()=>{ba.set(void 0)});const iL=async(t,e)=>{const{name:n,_i18n:{defaultLocale:r},_thumbnailFieldNames:i}=t,{locales:o}=e,{content:a}=o[r]??Object.values(o)[0]??{};if(!a)return;const s=i.map(l=>{if(l.includes("*")){const u=new RegExp(`^${Xt(l).replace("\\*",".+")}$`);return Object.keys(a).filter(d=>u.test(d))}return l}).flat(1);for(const l of s){const u=a[l]?await ql({value:a[l],entry:e,collectionName:n,thumbnail:!0}):void 0;if(u)return u}},_0=({entry:t,collectionName:e,fileName:n,relative:r=!1})=>{const{locales:i}=t,o=ki(e);if(!o)return[];const a=Ea(o,t),s=Object.values(i).map(({content:l})=>Object.entries(l??{}).map(([u,d])=>{if(typeof d=="string"&&(!r||!/^[/@]/.test(d))&&["image","file"].includes(gn({collectionName:e,keyPath:u,isIndexFile:a})?.widget??"string")){const f=m0({value:d,entry:t,collectionName:e,fileName:n});if(f&&Em(f.path).some(h=>h.collectionName===e&&h.fileName===n&&(r?h.entryRelative:!0)))return f}})).flat(1).filter((l,u,d)=>!!l&&d.indexOf(l)===u);if(r&&da({collectionName:e,fileName:n})?.entryRelative){const l=pn(Object.values(t.locales)[0].path).dirname;oe(Wn).forEach(u=>{pn(u.path).dirname===l&&!s.find(({path:d})=>d===u.path)&&s.push(u)})}return s},sE=["preSave","postSave","prePublish","postPublish","preUnpublish","postUnpublish"],m6=["preSave","prePublish"],oL=new Set,aL=async({type:t,draft:e,savingEntry:n})=>{const{login:r="",name:i=""}=oe(Un),{collection:o,collectionFile:a,isNew:s,collectionName:l,fileName:u}=e,{_i18n:{defaultLocale:d}}=a??o,{slug:f,locales:h}=n,p=Object.keys(h).filter(b=>b!==d),{content:g,path:m}=h[d],v=_0({entry:n,collectionName:l,fileName:u});for(const b of oL){if(b.name!==t)continue;const y=await b.handler({author:{login:r,name:i},entry:GF({data:zo(g),i18n:Object.fromEntries(p.map(w=>[w,{data:zo(h[w].content)}])),slug:f,path:m,newRecord:s,collection:l,mediaFiles:v.map(({sha:w,file:x,size:E,blobURL:$,...A})=>({id:w,name:A.name,path:A.path,file:x,size:E,url:$,displayURL:$})),meta:{path:m},isModification:null,label:null,partial:!1,author:"",raw:"",status:"",updatedOn:""})});if(m6.includes(t)&&wm(y)){const w=y.toJS();$t(w.data)&&$t(w.i18n)?(h[d].content=Pi(w.data),p.forEach(x=>{$t(w.i18n[x]?.data)&&(h[x].content=Pi(w.i18n[x].data))})):$t(w)&&(h[d].content=Pi(w))}}},vc=it(!1),vy=it(!1),sf=it({show:!1,multiple:!1}),_y=it({id:void 0,show:!1,status:"success",message:void 0,count:1,sourceLanguage:void 0}),ol=it(null),Jo=it(null),Iu=it(),by=new Set,v6="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(v6);const _6={ok:"OK",cancel:"Cancel",close:"Close",clear:"Clear",insert:"Insert",update:"Update",remove:"Remove",collapse:"Collapse",expand:"Expand",dismiss:"Dismiss",calendar:{year:"Year",previous_decade:"Previous Decade",next_decade:"Next Decade",month:"Month",previous_month:"Previous Month",next_month:"Next Month",today:"Today"},split_button:{x_options:"{name} Options",more_options:"More Options"},combobox:{select_an_option:"Select an option…",filter_options:"Filter Options",no_matching_options:"No matching options found"},number_input:{decrease:"Decrease",increase:"Increase"},password_input:{show_password:"Show Password",hide_password:"Hide Password"},text_editor:{text_editor:"Text Editor",code_editor:"Code Editor",text_style_options:"Text Style Options",show_text_style_options:"Show Text Style Options",paragraph:"Paragraph",heading_1:"Heading 1",heading_2:"Heading 2",heading_3:"Heading 3",heading_4:"Heading 4",heading_5:"Heading 5",heading_6:"Heading 6",bulleted_list:"Bulleted List",numbered_list:"Numbered List",blockquote:"Block Quote",code_block:"Code Block",bold:"Bold",italic:"Italic",strikethrough:"Strikethrough",code:"Code",link:"Link",insert_link:"Insert Link",update_link:"Update Link",text:"Text",url:"URL",edit_in_markdown:"Edit in Markdown",converter_error:"There was an error while enabling rich text mode. Please use the plain text editor instead.",language:"Language",plain_text:"Plain Text"}},b6=Object.freeze(Object.defineProperty({__proto__:null,strings:_6},Symbol.toStringTag,{value:"Module"})),y6={ok:"OK",cancel:"キャンセル",close:"閉じる",clear:"クリア",insert:"挿入",update:"更新",remove:"削除",collapse:"折り畳む",expand:"広げる",dismiss:"閉じる",calendar:{year:"年",previous_decade:"前の 10 年",next_decade:"次の 10 年",month:"月",previous_month:"前月",next_month:"翌月",today:"今日"},split_button:{x_options:"{name} オプション",more_options:"その他のオプション"},combobox:{select_an_option:"オプションを選択…",filter_options:"オプションを絞り込み",no_matching_options:"一致するオプションは見つかりませんでした"},number_input:{decrease:"減らす",increase:"増やす"},password_input:{show_password:"パスワードを表示",hide_password:"パスワードを隠す"},text_editor:{text_editor:"テキストエディター",code_editor:"コードエディター",text_style_options:"テキストスタイルオプション",show_text_style_options:"テキストスタイルオプションを表示",paragraph:"段落",heading_1:"見出し 1",heading_2:"見出し 2",heading_3:"見出し 3",heading_4:"見出し 4",heading_5:"見出し 5",heading_6:"見出し 6",bulleted_list:"番号なしリスト",numbered_list:"番号付きリスト",blockquote:"ブロック引用",code_block:"コードブロック",bold:"太字",italic:"斜体",strikethrough:"取り消し線",code:"コード",link:"リンク",insert_link:"リンクを挿入",update_link:"リンクを更新",text:"テキスト",url:"URL",edit_in_markdown:"マークダウンで編集",converter_error:"リッチテキストモードを有効化中に問題が発生しました。代わりにプレーンテキストエディターを使用してください。",language:"言語",plain_text:"プレーンテキスト"}},w6=Object.freeze(Object.defineProperty({__proto__:null,strings:y6},Symbol.toStringTag,{value:"Module"})),Gl=it(!1),sL=({fallbackLocale:t="en",initialLocale:e="en"}={})=>{Object.entries(Object.assign({"../locales/en.js":b6,"../locales/ja.js":w6})).forEach(([r,{strings:i}])=>{const[,o]=r.match(/([a-zA-Z-]+)\.js/);ax(o,{_sui:i})}),kz({fallbackLocale:t,initialLocale:e})},x6=["ar","fa","he","ur"],k6=t=>t&&x6.includes(t.split("-")[0])?"rtl":"ltr";Bt.subscribe(t=>{document.documentElement.dir=k6(t)}),new MutationObserver(()=>{Gl.set(document.dir==="rtl")}).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});var S6=j("<span> </span>");const E6={hash:"svelte-vgnyrz",code:".icon.small-arrow.svelte-vgnyrz {overflow:hidden;width:12px;text-indent:-6px;}"};function Qe(t,e){ke(t,E6);let n=ot(e,["$$slots","$$events","$$legacy","class","name"]);var r=S6();mt(r,()=>({...n,class:`sui icon material-symbols-outlined ${e.class??""}`,"aria-hidden":!("aria-label"in n)}),void 0,void 0,void 0,"svelte-vgnyrz");var i=F(r);Z(()=>ne(i,e.name)),S(t,r)}var T6=j("<div><!> <!></div>");const $6={hash:"svelte-67187j",code:".alert.svelte-67187j {display:flex;align-items:center;gap:var(--gap, 8px);padding:var(--padding, 8px);border-width:var(--border-width, var(--sui-control-medium-border-width));border-style:var(--border-style, solid);border-radius:var(--border-radius, var(--sui-control-medium-border-radius));font-size:var(--font-size, var(--sui-font-size-default));}.alert.error.svelte-67187j {border-color:var(--sui-error-border-color);color:var(--sui-error-foreground-color);background-color:var(--sui-error-background-color);}.alert.warning.svelte-67187j {border-color:var(--sui-warning-border-color);color:var(--sui-warning-foreground-color);background-color:var(--sui-warning-background-color);}.alert.info.svelte-67187j {border-color:var(--sui-info-border-color);color:var(--sui-info-foreground-color);background-color:var(--sui-info-background-color);}.alert.success.svelte-67187j {border-color:var(--sui-success-border-color);color:var(--sui-success-foreground-color);background-color:var(--sui-success-background-color);}"};function Hn(t,e){ke(t,$6);let n=ot(e,["$$slots","$$events","$$legacy","status","children","icon"]);var r=T6();mt(r,()=>({...n,role:"alert",class:`sui alert ${e.status??""}`}),void 0,void 0,void 0,"svelte-67187j");var i=F(r);{var o=l=>{var u=X(),d=M(u);Ue(d,()=>e.icon),S(l,u)},a=l=>{{let u=_(()=>e.status==="success"?"check_circle":e.status);Qe(l,{get name(){return c(u)}})}};U(i,l=>{e.icon?l(o):l(a,!1)})}var s=z(i,2);Ue(s,()=>e.children??He),S(t,r)}const lL=()=>navigator.userAgentData?.platform==="macOS"||navigator.platform.startsWith("Mac"),yy=(t,e)=>{const{ctrlKey:n,metaKey:r,altKey:i,shiftKey:o,code:a}=t,s=a.replace(/^(?:Digit|Key)(.)$/,"$1");return e.split(/\s+/).some(l=>{const u=l.split("+");return u.includes("Ctrl")&&!n||u.includes("Meta")&&!r||u.includes("Alt")&&!i||u.includes("Shift")&&!o||!u.includes("Ctrl")&&n||!u.includes("Meta")&&r||!u.includes("Alt")&&i||!u.includes("Shift")&&o?!1:u.filter(d=>!["Ctrl","Meta","Alt","Shift"].includes(d)).every(d=>d.toUpperCase()===s.toUpperCase())})},cL=(t,e="")=>{let n;const r=a=>{const{disabled:s,offsetParent:l}=t,{top:u,left:d}=t.getBoundingClientRect();!yy(a,n)||!l||(s&&t.style.setProperty("pointer-events","auto"),document.elementsFromPoint(d+4,u+4).includes(t)&&(a.preventDefault(),s||(t.focus(),t.click())),s&&t.style.removeProperty("pointer-events"))},i=()=>{globalThis.removeEventListener("keydown",r,{capture:!0}),t.removeAttribute("aria-keyshortcuts")},o=()=>{n=e?e.replace(/\bAccel\b/g,lL()?"Meta":"Ctrl"):void 0,n&&(globalThis.addEventListener("keydown",r,{capture:!0}),t.setAttribute("aria-keyshortcuts",n))};return o(),{update(a){i(),o()},destroy(){i()}}};var A6=j('<span role="none" class="sui truncated-text svelte-8a3c5o"><!></span>');const C6={hash:"svelte-8a3c5o",code:".truncated-text.svelte-8a3c5o {display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;white-space:normal;overflow-wrap:anywhere;}"};function Ur(t,e){ke(t,C6);let n=N(e,"lines",3,1),r=N(e,"children",3,void 0);var i=A6(),o=F(i);Ue(o,()=>r()??He),Z(()=>Co(i,`-webkit-line-clamp: ${n()??""}; line-clamp: ${n()??""};`)),S(t,i)}const b0=(t="e",e=7)=>[t,Vi(e)].join("-"),wy=t=>{if(t)return new Promise(e=>{const n=new IntersectionObserver(([r])=>{r.isIntersecting&&(n.disconnect(),e(void 0))});globalThis.requestAnimationFrame(()=>{n.observe(t)})})};let P6=class{open=it(!1);style=it({inset:void 0,zIndex:void 0,minWidth:void 0,maxWidth:void 0,height:void 0});observer=new IntersectionObserver(e=>{e.forEach(({intersectionRect:n,rootBounds:r})=>{if(!n||!r)return;const i=this.popupElement.querySelector(".content"),{scrollHeight:o,scrollWidth:a}=i,s=n.top-8,l=r.height-n.bottom-8;let{position:u}=this,d;document.dir==="rtl"&&(u.endsWith("-left")?u=u.replace("-left","-right"):u.endsWith("-right")&&(u=u.replace("-right","-left")),u.startsWith("left-")?u=u.replace("left-","right-"):u.startsWith("right-")&&(u=u.replace("right-","left-"))),u.startsWith("bottom-")&&o>l&&(s>l?(u=u.replace("bottom-","top-"),d=s):d=l),u.endsWith("-left")&&n.left+a>r.width-8&&(u=u.replace("-left","-right")),u.endsWith("-right")&&n.right-a<8&&(u=u.replace("-right","-left"));const f=u.startsWith("bottom-")?`${Math.round(n.bottom)}px`:u.endsWith("-top")?`${Math.round(n.top)}px`:"auto",h=u.startsWith("left-")?`${Math.round(r.width-n.left)}px`:u.endsWith("-right")?`${Math.round(r.width-n.right)}px`:"auto",p=u.startsWith("top-")?`${Math.round(r.height-n.top)}px`:u.endsWith("-bottom")?`${Math.round(r.height-n.bottom)}px`:"auto",g=u.startsWith("right-")?`${Math.round(n.right)}px`:u.endsWith("-left")?`${Math.round(n.left)}px`:"auto",m={inset:[f,h,p,g].join(" "),zIndex:1e3,minWidth:`${Math.round(n.width)}px`,maxWidth:u.endsWith("-left")?`${Math.round(r.width-n.left-8)}px`:`${Math.round(n.right-8)}px`,height:d?`${Math.round(d)}px`:"auto"};JSON.stringify(m)!==JSON.stringify(oe(this.style))&&this.style.set(m)})});constructor(e,n,r,i){this.anchorElement=e,this.popupElement=n,this.position=r,this.positionBaseElement=i??e,this.id=b0("popup"),this.anchorElement.setAttribute("aria-controls",this.id),this.popupElement.setAttribute("id",this.id),Nd(e,"click",()=>{!this.isDisabled&&!this.isReadOnly&&this.open.set(!oe(this.open))}),Nd(e,"keydown",o=>{const{key:a,ctrlKey:s,metaKey:l,shiftKey:u,altKey:d}=o,f=u||d||s||l;!this.isDisabled&&!this.isReadOnly&&["Enter"," "].includes(a)&&!f&&(o.preventDefault(),o.stopPropagation(),this.open.set(!oe(this.open)))}),Nd(e,"transitionstart",()=>{this.anchorElement.closest(".hiding, .hidden, [hidden]")&&this.hideImmediately()}),new IntersectionObserver(([o])=>{!o.isIntersecting&&oe(this.open)&&this.hideImmediately()}).observe(this.anchorElement),Nd(this.popupElement,"click",o=>{o.stopPropagation();const a=o.target;oe(this.open)&&(a===this.popupElement||a.matches('[role^="menuitem"], [role="option"]'))&&this.open.set(!1)}),Nd(this.popupElement,"keydown",o=>{const{key:a,ctrlKey:s,metaKey:l,shiftKey:u,altKey:d}=o;a==="Escape"&&!(u||d||s||l)&&(o.preventDefault(),o.stopPropagation(),this.open.set(!1))}),this.open.subscribe(o=>{o?this.checkPosition():this.anchorElement.getAttribute("aria-expanded")==="true"&&(this.anchorElement.focus(),this.anchorElement.removeAttribute("aria-controls")),this.anchorElement.setAttribute("aria-expanded",String(o))}),new ResizeObserver(()=>{this.checkPosition()}).observe(this.positionBaseElement)}get isDisabled(){return this.anchorElement.matches('[aria-disabled="true"]')}get isReadOnly(){return this.anchorElement.matches('[aria-readonly="true"]')}checkPosition(){this.observer.unobserve(this.positionBaseElement),this.observer.observe(this.positionBaseElement)}async hideImmediately(){this.popupElement.hidden=!0,this.open.set(!1),await Rt(50),this.popupElement.hidden=!1}};const O6=(...t)=>new P6(...t);function L6(t,e){var n=X(),r=M(n);Ue(r,()=>e.children??He),S(t,n)}var I6=j("<dialog><!> <!></dialog>");const N6={hash:"svelte-bddq2e",code:"dialog.svelte-bddq2e {position:fixed;inset:0;z-index:9999999;display:flex;justify-content:center;align-items:center;overflow:hidden;outline:0;margin:0;border:0;padding:0;width:100dvw;max-width:100dvw;height:100dvh;max-height:100dvh;color:var(--sui-primary-foreground-color);background:transparent;-webkit-user-select:none;user-select:none;touch-action:none;pointer-events:all;cursor:default;}dialog.svelte-bddq2e::backdrop {background:transparent;}dialog.backdrop.svelte-bddq2e {background-color:var(--sui-popup-backdrop-color);}dialog.open.svelte-bddq2e {transition-duration:50ms;opacity:1;}dialog.svelte-bddq2e:not(.open) {transition-duration:400ms;opacity:0;}dialog[hidden].svelte-bddq2e {transition-duration:1ms !important;}dialog.svelte-bddq2e:not(.active) {pointer-events:none !important;}dialog.svelte-bddq2e:not(.active) * {transition-duration:0ms !important;pointer-events:none !important;}"};function uL(t,e){ae(e,!0),ke(t,N6);const n=x=>{var E=I6(),$=({target:P})=>{i()&&s()&&P?.matches("dialog")&&(i(i().returnValue="cancel",!0),r(!1))},A=P=>{P.preventDefault(),i()&&l()&&(i(i().returnValue="cancel",!0),r(!1))};mt(E,()=>({...d,inert:!c(p),role:o(),class:`sui modal ${e.class??""}`,onclick:$,oncancel:A,[Nr]:{backdrop:a(),open:c(p),active:c(g)}}),void 0,void 0,void 0,"svelte-bddq2e");var k=F(E);Ue(k,()=>e.extraContent??He);var T=z(k,2);{var C=P=>{var O=X(),I=M(O);Ue(I,()=>e.children??He),S(P,O)};U(T,P=>{(c(m)||u())&&P(C)})}St(E,P=>i(P),()=>i()),S(x,E)};let r=N(e,"open",15,!1),i=N(e,"dialog",15),o=N(e,"role",3,"dialog"),a=N(e,"showBackdrop",3,!1),s=N(e,"lightDismiss",3,!1),l=N(e,"escapeDismiss",3,!0),u=N(e,"keepContent",3,!1),d=ot(e,["$$slots","$$events","$$legacy","open","dialog","class","role","showBackdrop","lightDismiss","escapeDismiss","keepContent","children","extraContent","onOpening","onOpen","onClosing","onOk","onCancel","onClose"]);const f=()=>{i()?.focus()},h=x=>{i()&&(i(i().returnValue=x,!0),r(!1))};let p=ie(!1),g=ie(!1),m=ie(!1);const v=async()=>new Promise(x=>{const E=$=>{$.target===i()&&(i().removeEventListener("transitionend",E),x())};i()?.addEventListener("transitionend",E)}),b=async()=>{!i()||i()?.open||(e.onOpening?.(new CustomEvent("Opening")),V(m,!0),i().showModal(),e.onOpen?.(new CustomEvent("Open")),await Rt(0),V(p,!0),await v(),V(g,!0))},y=async()=>{if(!i()||!i().open)return;const{returnValue:x}=i();e.onClosing?.(new CustomEvent("Closing")),document.body.inert=!0,i().close(),document.body.inert=!1,V(g,!1),V(p,!1),await v(),V(m,!1),x==="ok"&&e.onOk?.(new CustomEvent("Ok")),x==="cancel"&&e.onCancel?.(new CustomEvent("Cancel")),e.onClose?.(new CustomEvent("Close",{detail:{returnValue:x}})),i(i().returnValue="",!0)};ze(()=>{r()?b():y()}),Vt(()=>{const x=hm(L6,{target:document.querySelector(".sui.app-shell")??document.body,props:{children:n}});return()=>{i()?.close(),vC(x)}});var w={focus:f,close:h};return se(w)}var R6=j('<div role="none"><!></div>');const M6={hash:"svelte-s3imd3",code:".content.svelte-s3imd3 {position:absolute;overflow-y:auto;outline-width:0 !important;width:auto;color:var(--sui-primary-foreground-color);background-color:var(--sui-secondary-background-color-translucent);box-shadow:0 8px 16px var(--sui-popup-shadow-color);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);transition-property:opacity, transform;}.content.menu.svelte-s3imd3 {border-width:var(--sui-menu-border-width, 1px);border-style:var(--sui-menu-border-style, solid);border-color:var(--sui-menu-border-width, var(--sui-secondary-border-color));border-radius:var(--sui-menu-border-radius, 4px);padding:var(--sui-menu-padding, 4px);}.content.menu.svelte-s3imd3 .sui.menu {border-width:0;border-radius:0;padding:0;background-color:transparent;}.content.listbox.svelte-s3imd3 {border-width:var(--sui-listbox-border-width, 1px);border-style:var(--sui-listbox-border-style, solid);border-color:var(--sui-listbox-border-width, var(--sui-secondary-border-color));border-radius:var(--sui-listbox-border-radius, 4px);padding:var(--sui-listbox-padding, 4px);}.content.listbox.svelte-s3imd3 .sui.listbox {border-width:0;border-radius:0;padding:0;background-color:transparent;}.content.touch.svelte-s3imd3 {position:static;border-width:0 !important;border-radius:4px !important;padding:8px;min-width:320px !important;max-width:calc(100dvw - 32px) !important;max-height:calc(100dvh - 32px) !important;}dialog.open .content.touch.svelte-s3imd3 {transform:scale(100%) !important;}dialog:not(.open) .content.touch.svelte-s3imd3 {transform:scale(90%);}.content.touch.combobox.svelte-s3imd3 .sui.listbox {gap:4px;padding:8px 4px !important;}dialog.open .content.svelte-s3imd3 {transition-duration:50ms;opacity:1;transform:translateY(2px);}dialog:not(.open) .content.svelte-s3imd3 {transition-duration:300ms;opacity:0;transform:translateY(-8px);}"};function Ym(t,e){ae(e,!0),ke(t,M6);const n=()=>H(c(w),"$style",r),[r,i]=ve(),o=O=>{var I=R6();let L,D;var B=F(I);Ue(B,()=>e.children??He),St(I,K=>l(K),()=>l()),Z(()=>{Se(I,"hidden",!a()),L=hn(I,1,`content ${e.class??""} ${c(y)??""}`,"svelte-s3imd3",L,{touch:c(A)}),D=Co(I,"",D,{inset:n().inset,"z-index":n().zIndex,"min-width":n().minWidth,"max-width":n().maxWidth,"max-height":n().height,visibility:n().inset?void 0:"hidden"})}),ui("mouseenter",I,()=>{s(!0),h()&&window.clearTimeout(E)}),ui("mouseleave",I,()=>{s(!1),h()&&(E=window.setTimeout(()=>{a(!1)},200))}),S(O,I)};let a=N(e,"open",15,!1),s=N(e,"hovered",15,!1),l=N(e,"content",15,void 0),u=N(e,"showBackdrop",3,void 0),d=N(e,"position",3,"bottom-left"),f=N(e,"positionBaseElement",3,void 0),h=N(e,"parentDialogElement",3,void 0),p=N(e,"touchOptimized",3,!1),g=ot(e,["$$slots","$$events","$$legacy","open","hovered","content","class","showBackdrop","anchor","position","positionBaseElement","parentDialogElement","touchOptimized","children","onOpen"]),m=ie(!1),v=ie(void 0),b=ie(!1),y=ie(void 0),w=ie(At(it({inset:void 0,zIndex:void 0,width:void 0,height:void 0}))),x,E=0;const $=()=>{x=O6(e.anchor,c(v),d(),f()),YD(V(w,x.style,!0),"$style",r),x.open.subscribe(O=>{a(O)}),V(y,e.anchor?.getAttribute("aria-haspopup")??void 0,!0),V(m,!0)};ze(()=>{h()&&!c(v)&&l()&&(V(v,h()),c(v).append(l()))}),ze(()=>{e.anchor&&c(v)&&!c(m)&&$()}),ze(()=>{h()&&a()&&x?.checkPosition()});const A=_(()=>p()&&c(b));Vt(()=>{V(b,globalThis.matchMedia("(pointer: coarse)").matches,!0)});var k=X(),T=M(k);{var C=O=>{o(O)},P=O=>{{let I=_(()=>u()??c(A));uL(O,Qt(()=>g,{role:"none",class:"popup",get showBackdrop(){return c(I)},lightDismiss:!0,keepContent:!0,onOpen:async L=>{if(e.onOpen?.(L),await Rt(100),!l())return;const D=l().querySelector('[tabindex]:not([aria-disabled="true"])');D?D.focus():(l(l().tabIndex=-1,!0),l().focus())},get dialog(){return c(v)},set dialog(L){V(v,L,!0)},get open(){return a()},set open(L){a(L)},children:(L,D)=>{o(L)},$$slots:{default:!0}}))}};U(T,O=>{h()?O(C):O(P,!1)})}S(t,k),se(),i()}var D6=j('<span role="none" class="label svelte-a9g8gt"><!></span>'),F6=j('<span role="none" class="label svelte-a9g8gt"><!></span>'),z6=j('<span role="none" class="label svelte-a9g8gt"><!></span>'),j6=j("<!> <!>",1),U6=j("<button><!> <!> <!></button> <!>",1);const B6={hash:"svelte-a9g8gt",code:"button.svelte-a9g8gt {flex:none;display:inline-flex;align-items:center;gap:4px;margin:var(--sui-focus-ring-width);border-width:0;border-style:solid;border-color:transparent;padding:0;color:var(--sui-control-foreground-color, inherit);background-color:transparent;box-shadow:none;font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);font-weight:var(--sui-font-weight-normal, normal);text-align:start;cursor:pointer;transition:all 200ms;}button[hidden].svelte-a9g8gt {display:none !important;}button.svelte-a9g8gt:not(:disabled):focus-visible {z-index:1;}button.svelte-a9g8gt:is(.primary:where(.svelte-a9g8gt), .secondary:where(.svelte-a9g8gt), .tertiary:where(.svelte-a9g8gt), .ghost:where(.svelte-a9g8gt)) {justify-content:center;border-width:1px;}button.svelte-a9g8gt:is(.primary:where(.svelte-a9g8gt), .secondary:where(.svelte-a9g8gt), .tertiary:where(.svelte-a9g8gt), .ghost:where(.svelte-a9g8gt)) .label:where(.svelte-a9g8gt):only-child {padding:0 4px;}button.primary.svelte-a9g8gt {border-width:var(--sui-button-primary-border-width, 1px);border-style:var(--sui-button-primary-border-style, solid);border-color:var(--sui-button-primary-border-color, var(--sui-primary-accent-color));color:var(--sui-button-primary-foreground-color, var(--sui-primary-accent-color-inverted));background-color:var(--sui-button-primary-background-color, var(--sui-primary-accent-color));font-weight:var(--sui-button-primary-font-weight, var(--sui-font-weight-normal, normal));}button.primary.svelte-a9g8gt:is(:where(.svelte-a9g8gt):hover, :where(.svelte-a9g8gt):focus-visible, [aria-expanded=true]:where(.svelte-a9g8gt)) {color:var(--sui-button-primary-foreground-color-focus, var(--sui-button-primary-foreground-color, var(--sui-primary-accent-color-inverted)));background-color:var(--sui-button-primary-background-color-focus, var(--sui-primary-accent-color-light));}button.primary.svelte-a9g8gt:active {color:var(--sui-button-primary-foreground-color-active, var(--sui-button-primary-foreground-color, var(--sui-primary-accent-color-inverted)));background-color:var(--sui-button-primary-background-color-active, var(--sui-primary-accent-color-dark));}button.secondary.svelte-a9g8gt {border-width:var(--sui-button-secondary-border-width, 1px);border-style:var(--sui-button-secondary-border-style, solid);border-color:var(--sui-button-secondary-border-color, var(--sui-primary-accent-color));color:var(--sui-button-secondary-foreground-color, var(--sui-primary-accent-color-text));background-color:var(--sui-button-secondary-background-color, var(--sui-button-background-color));font-weight:var(--sui-button-secondary-font-weight, var(--sui-font-weight-normal, normal));}button.secondary.svelte-a9g8gt:is(:where(.svelte-a9g8gt):hover, :where(.svelte-a9g8gt):focus-visible, [aria-expanded=true]:where(.svelte-a9g8gt)) {color:var(--sui-button-secondary-foreground-color-focus, var(--sui-button-secondary-foreground-color, var(--sui-primary-accent-color-text)));background-color:var(--sui-button-secondary-background-color-focus, var(--sui-hover-background-color));}button.secondary.svelte-a9g8gt:active {color:var(--sui-button-secondary-foreground-color-active, var(--sui-button-secondary-foreground-color, var(--sui-primary-accent-color-text)));background-color:var(--sui-button-secondary-background-color-active, var(--sui-active-background-color));}button.secondary[aria-pressed=true].svelte-a9g8gt {color:var(--sui-button-secondary-foreground-color-pressed);background-color:var(--sui-button-secondary-background-color-pressed, var(--sui-primary-accent-color));}button.tertiary.svelte-a9g8gt {border-width:var(--sui-button-tertiary-border-width, 1px);border-style:var(--sui-button-tertiary-border-style, solid);border-color:var(--sui-button-tertiary-border-color, var(--sui-button-border-color));color:var(--sui-button-tertiary-foreground-color, var(--sui-highlight-foreground-color));background-color:var(--sui-button-tertiary-background-color, var(--sui-button-background-color));font-weight:var(--sui-button-tertiary-font-weight, var(--sui-font-weight-normal, normal));}button.tertiary.svelte-a9g8gt:is(:where(.svelte-a9g8gt):hover, :where(.svelte-a9g8gt):focus-visible, [aria-expanded=true]:where(.svelte-a9g8gt)) {color:var(--sui-button-tertiary-foreground-color-focus, var(--sui-button-tertiary-foreground-color, var(--sui-highlight-foreground-color)));background-color:var(--sui-button-tertiary-background-color-focus, var(--sui-hover-background-color));}button.tertiary.svelte-a9g8gt:active {color:var(--sui-button-tertiary-foreground-color-active, var(--sui-button-tertiary-foreground-color, var(--sui-highlight-foreground-color)));background-color:var(--sui-button-tertiary-background-color-active, var(--sui-active-background-color));}button.tertiary[aria-pressed=true].svelte-a9g8gt {color:var(--sui-button-tertiary-foreground-color-pressed);background-color:var(--sui-button-tertiary-background-color-pressed, var(--sui-selected-background-color));}button.ghost.svelte-a9g8gt {font-weight:var(--sui-button-ghost-font-weight, var(--sui-font-weight-normal, normal));}button.ghost.svelte-a9g8gt:is(:where(.svelte-a9g8gt):hover, :where(.svelte-a9g8gt):focus-visible, [aria-expanded=true]:where(.svelte-a9g8gt)) {color:var(--sui-button-ghost-foreground-color-focus);background-color:var(--sui-button-ghost-background-color-focus, var(--sui-hover-background-color));}button.ghost.svelte-a9g8gt:active {color:var(--sui-button-ghost-foreground-color-active);background-color:var(--sui-button-ghost-background-color-active, var(--sui-active-background-color));}button.ghost[aria-pressed=true].svelte-a9g8gt {color:var(--sui-button-ghost-foreground-color-pressed);background-color:var(--sui-button-ghost-background-color-pressed, var(--sui-selected-background-color));}button.link.svelte-a9g8gt {outline:0;margin:0;border-radius:0 !important;padding:0 !important;height:auto !important;color:var(--sui-button-link-foreground-color, var(--sui-primary-accent-color-text));}button.link.svelte-a9g8gt .label:where(.svelte-a9g8gt) {padding:0;line-height:var(--sui-line-height-compact);text-decoration:var(--sui-button-link-text-decoration, none);text-underline-offset:2px;white-space:normal;}:is(:root, :host)[data-underline-links='true'] button.link.svelte-a9g8gt .label:where(.svelte-a9g8gt) {text-decoration:underline;}button.link.svelte-a9g8gt:is(:where(.svelte-a9g8gt):hover, :where(.svelte-a9g8gt):focus, :where(.svelte-a9g8gt):active) .label:where(.svelte-a9g8gt) {text-decoration:var(--sui-button-link-text-decoration-focus, underline);}button.small.svelte-a9g8gt {border-radius:var(--sui-button-small-border-radius);padding:var(--sui-button-small-padding);height:var(--sui-button-small-height);font-size:var(--sui-button-small-font-size, var(--sui-font-size-small));}button.small.svelte-a9g8gt .icon {font-size:var(--sui-font-size-large);}button.medium.svelte-a9g8gt {border-radius:var(--sui-button-medium-border-radius);padding:var(--sui-button-medium-padding);height:var(--sui-button-medium-height);font-size:var(--sui-button-medium-font-size, var(--sui-font-size-default));}button.large.svelte-a9g8gt {border-radius:var(--sui-button-large-border-radius);padding:var(--sui-button-large-padding);height:var(--sui-button-large-height);font-size:var(--sui-button-large-font-size, var(--sui-font-size-large));}button.pill.svelte-a9g8gt {border-radius:80px;padding:var(--sui-button-medium-pill-padding, 0 12px);}button.flex.svelte-a9g8gt {flex:auto;width:-moz-available;width:-webkit-fill-available;width:stretch;}button.iconic.svelte-a9g8gt {justify-content:center;padding:0;aspect-ratio:1/1;}button.danger.svelte-a9g8gt {background-color:var(--sui-error-background-color);}button.svelte-a9g8gt .label:where(.svelte-a9g8gt) {padding:0 4px;}button.svelte-a9g8gt > * {pointer-events:none;}button.svelte-a9g8gt :has([slot=start-icon] + [slot=end-icon]) {gap:0;}"};function et(t,e){ae(e,!0),ke(t,B6);let n=N(e,"element",15),r=N(e,"class",3,""),i=N(e,"type",3,"button"),o=N(e,"role",3,"button"),a=N(e,"name",3,void 0),s=N(e,"value",3,void 0),l=N(e,"valueType",19,()=>typeof s()),u=N(e,"hidden",3,!1),d=N(e,"disabled",3,!1),f=N(e,"readonly",3,!1),h=N(e,"pressed",3,void 0),p=N(e,"keyShortcuts",3,void 0),g=N(e,"label",3,""),m=N(e,"lines",3,1),v=N(e,"variant",3,void 0),b=N(e,"size",3,"medium"),y=N(e,"iconic",3,!1),w=N(e,"pill",3,!1),x=N(e,"flex",3,!1),E=N(e,"popupPosition",3,"bottom-left"),$=N(e,"showPopupBackdrop",3,!1),A=ot(e,["$$slots","$$events","$$legacy","element","class","type","role","name","value","valueType","hidden","disabled","readonly","pressed","keyShortcuts","label","lines","variant","size","iconic","pill","flex","popupPosition","showPopupBackdrop","children","startIcon","endIcon","popup"]);var k=U6(),T=M(k);mt(T,()=>({...A,class:`sui button ${v()??""} ${b()??""} ${r()??""}`,type:i(),name:a(),value:s(),hidden:u(),disabled:d(),role:o(),"aria-hidden":u(),"aria-disabled":d(),"aria-readonly":f(),"aria-pressed":h(),"data-type":l(),"data-name":a(),"data-label":g(),"data-value":s(),[Nr]:{iconic:y(),pill:w(),flex:x()}}),void 0,void 0,void 0,"svelte-a9g8gt");var C=F(T);Ue(C,()=>e.startIcon??He);var P=z(C,2);{var O=K=>{var G=X(),W=M(G);{var Y=q=>{var J=D6(),Q=F(J);Ur(Q,{get lines(){return m()},children:(ee,re)=>{var te=Fe();Z(()=>ne(te,g())),S(ee,te)},$$slots:{default:!0}}),S(q,J)},R=q=>{var J=F6(),Q=F(J);Ue(Q,()=>e.children??He),S(q,J)};U(W,q=>{g()?q(Y):q(R,!1)})}S(K,G)},I=K=>{var G=j6(),W=M(G);{var Y=q=>{var J=z6(),Q=F(J);Ur(Q,{get lines(){return m()},children:(ee,re)=>{var te=Fe();Z(()=>ne(te,g())),S(ee,te)},$$slots:{default:!0}}),S(q,J)};U(W,q=>{g()&&q(Y)})}var R=z(W,2);Ue(R,()=>e.children??He),S(K,G)};U(P,K=>{v()==="link"?K(O):K(I,!1)})}var L=z(P,2);Ue(L,()=>e.endIcon??He),St(T,K=>n(K),()=>n()),Vs(T,(K,G)=>cL?.(K,G),p);var D=z(T,2);{var B=K=>{Ym(K,{get anchor(){return n()},get position(){return E()},get showBackdrop(){return $()},touchOptimized:!0,children:(G,W)=>{var Y=X(),R=M(Y);Ue(R,()=>e.popup),S(G,Y)},$$slots:{default:!0}})};U(D,K=>{e.popup&&K(B)})}S(t,k),se()}var q6=j('<div role="none"><!></div>'),H6=j('<div role="none"><div role="alert" class="message svelte-1s543g"><!> <!></div> <!></div>');const K6={hash:"svelte-1s543g",code:".infobar.svelte-1s543g {flex:none;display:flex;align-items:center;gap:var(--sui-infobar-gap, 8px);border-width:var(--sui-infobar-border-width, 0 0 1px);border-style:var(--sui-infobar-border-style, solid);padding:var(--sui-infobar-padding, 0);min-height:var(--sui-infobar-min-height, 32px);font-size:var(--sui-infobar-font-size, var(--sui-font-size-small));}.infobar.info.svelte-1s543g {border-color:var(--sui-info-border-color);color:var(--sui-info-foreground-color);background-color:var(--sui-info-background-color);}.infobar.warning.svelte-1s543g {border-color:var(--sui-warning-border-color);color:var(--sui-warning-foreground-color);background-color:var(--sui-warning-background-color);}.infobar.error.svelte-1s543g {border-color:var(--sui-error-border-color);color:var(--sui-error-foreground-color);background-color:var(--sui-error-background-color);}.infobar.success.svelte-1s543g {border-color:var(--sui-success-border-color);color:var(--sui-success-foreground-color);background-color:var(--sui-success-background-color);}.message.svelte-1s543g {flex:auto;display:flex;align-items:center;justify-content:var(--sui-infobar-message-justify-content, start);gap:var(--sui-infobar-message-gap, 6px);padding:var(--sui-infobar-message-padding, 0 8px);}.message.svelte-1s543g button {font-size:inherit !important;}.message.svelte-1s543g .icon {font-size:16px; /* !hardcoded */}"};function Jm(t,e){ae(e,!0),ke(t,K6);const n=()=>H(ce,"$_",r),[r,i]=ve();let o=N(e,"show",15,!0),a=N(e,"dismissible",3,!0),s=N(e,"status",3,"info"),l=N(e,"children",3,void 0),u=N(e,"icon",3,void 0);var d=X(),f=M(d);{var h=p=>{var g=H6(),m=F(g),v=F(m);{var b=$=>{var A=X(),k=M(A);Ue(k,u),S($,A)},y=$=>{{let A=_(()=>s()==="success"?"check_circle":s());Qe($,{get name(){return c(A)}})}};U(v,$=>{u()?$(b):$(y,!1)})}var w=z(v,2);Ue(w,()=>l()??He);var x=z(m,2);{var E=$=>{var A=q6(),k=F(A);{let T=_(()=>n()("_sui.dismiss"));et(k,{iconic:!0,size:"small",variant:"ghost",get"aria-label"(){return c(T)},onclick:()=>{o(!1)},children:(C,P)=>{Qe(C,{name:"close"})},$$slots:{default:!0}})}S($,A)};U(x,$=>{a()&&$(E)})}Z(()=>hn(g,1,`infobar ${s()??""}`,"svelte-1s543g")),S(p,g)};U(f,p=>{o()&&p(h)})}S(t,d),se(),i()}var V6=j("<div><!></div>");const G6={hash:"svelte-1mi0urf",code:".bottom-navigation.svelte-1mi0urf {height:var(--sui-bottom-navigation-height, var(--sui-primary-toolbar-size));border-top-width:var(--sui-bottom-navigation-border-color, 1px);border-top-style:var(--sui-bottom-navigation-border-style, solid);border-top-color:var(--sui-bottom-navigation-border-color, var(--sui-secondary-border-color));}.bottom-navigation.svelte-1mi0urf:is([inert]:where(.svelte-1mi0urf), [hidden]:where(.svelte-1mi0urf)) {display:none;}.bottom-navigation.svelte-1mi0urf .buttons {flex:auto;display:flex;align-items:center;justify-content:space-evenly;}"};function W6(t,e){ke(t,G6);let n=ot(e,["$$slots","$$events","$$legacy","class","children"]);var r=V6();mt(r,()=>({role:"none",class:`sui bottom-navigation ${e.class??""}`,...n}),void 0,void 0,void 0,"svelte-1mi0urf");var i=F(r);Ue(i,()=>e.children??He),S(t,r)}var Y6=j("<div><!></div>");const J6={hash:"svelte-1h7ius7",code:".button-group.svelte-1h7ius7 {flex:none;display:inline-flex;align-items:center;}"};function X6(t,e){ke(t,J6);let n=ot(e,["$$slots","$$events","$$legacy","class","children"]);var r=Y6();mt(r,()=>({...n,role:"group",class:`sui button-group ${e.class??""}`}),void 0,void 0,void 0,"svelte-1h7ius7");var i=F(r);Ue(i,()=>e.children??He),S(t,r)}var Z6=j('<div role="none" class="sui floating-action-button-wrapper svelte-17fkyp9"><!></div>');const Q6={hash:"svelte-17fkyp9",code:`.floating-action-button-wrapper.svelte-17fkyp9 {display:contents;}
|
|
349
|
-
@media (width < 768px) {.floating-action-button-wrapper.svelte-
|
|
350
|
-
}`};function dL(t,e){ke(t,Q6);let n=N(e,"children",3,void 0);var r=Z6(),i=F(r);Ue(i,()=>n()??He),S(t,r)}const fL=t=>{const{type:e="string",name:n,label:r}=t.dataset;let{value:i}=t.dataset;return e==="number"?(i=Number(i),Number.isNaN(i)&&(i=null)):e==="boolean"?i=i==="true":e==="string"&&(i=i?String(i):""),{target:t,type:e,name:n,label:r,value:i}},lE=t=>(t=t.trim(),t?t.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLocaleLowerCase():""),eH={grid:{orientation:"vertical",childRoles:["row"],childSelectedAttr:"aria-selected",focusChild:!0,selectFirst:!0},listbox:{orientation:"vertical",childRoles:["option"],childSelectedAttr:"aria-selected",focusChild:!1,selectFirst:!1},menu:{orientation:"vertical",childRoles:["menuitem","menuitemcheckbox","menuitemradio"],childSelectedAttr:"aria-checked",focusChild:!0,selectFirst:!1},menubar:{orientation:"horizontal",childRoles:["menuitem","menuitemcheckbox","menuitemradio"],childSelectedAttr:"aria-checked",focusChild:!0,selectFirst:!1},radiogroup:{orientation:"horizontal",childRoles:["radio"],childSelectedAttr:"aria-checked",focusChild:!0,selectFirst:!1},tablist:{orientation:"horizontal",childRoles:["tab"],childSelectedAttr:"aria-selected",focusChild:!0,selectFirst:!0}};let tH=class{constructor(e,{clickToSelect:n=!0}={}){e.dispatchEvent(new CustomEvent("Initializing")),this.parent=e,this.role=e.getAttribute("role"),this.multi=this.parent.getAttribute("aria-multiselectable")==="true",this.id=b0(this.role),this.parentGroupSelector=`[role="group"], [role="${this.role}"]`,this.clickToSelect=n;const{orientation:r,childRoles:i,childSelectedAttr:o,focusChild:a,selectFirst:s}=eH[this.role];this.orientation=this.grid?"horizontal":this.parent.getAttribute("aria-orientation")??r,this.childRoles=i,this.childSelectedAttr=o,this.childSelectedProp=o.replace("aria-",""),this.focusChild=a,this.selectFirst=s,this.parent.tabIndex=a?-1:0,(async()=>(await Rt(100),this.activate()))()}activate(){const{parent:e,allMembers:n,selected:r}=this;n.forEach((i,o)=>{const a=i.getAttribute(this.childSelectedAttr)==="true"||(r?i===r:this.selectFirst&&o===0),s=document.querySelector(`#${i.getAttribute("aria-controls")}`);i.id||=`${this.id}-item-${o+1}`,i.tabIndex=a?0:-1,i.setAttribute(this.childSelectedAttr,String(a)),s&&(s.inert=!a,s.setAttribute("aria-labelledby",i.id),s.setAttribute("aria-hidden",String(!a)),a&&globalThis.setTimeout(()=>{try{s.scrollIntoView({block:"nearest",inline:"nearest",behavior:"auto"})}catch{s.scrollIntoView(!0)}},300))}),e.addEventListener("click",i=>{this.onClick(i)}),e.addEventListener("keydown",i=>{this.onKeyDown(i)}),e.dispatchEvent(new CustomEvent("Initialized"))}get selector(){return this.childRoles.map(e=>`[role="${e}"]`).join(",")}get allMembers(){return[...this.parent.querySelectorAll(this.selector)]}get activeMembers(){return this.allMembers.filter(e=>!e.matches('[aria-disabled="true"], [aria-hidden="true"]'))}get selected(){return this.activeMembers.find(e=>e.matches(`[${this.childSelectedAttr}="true"]`))}get isDisabled(){return this.parent.matches('[aria-disabled="true"]')}get isReadOnly(){return this.parent.matches('[aria-readonly="true"]')}get grid(){return this.role==="grid"||this.role==="listbox"&&this.parent.matches(".grid")}selectTarget(e,n){if(this.isDisabled||this.isReadOnly){e.preventDefault();return}const r=n.getAttribute("role"),i=n.closest(this.parentGroupSelector),o=e.type==="click",a=e.type==="keydown"&&e.key===" ";this.activeMembers.forEach(s=>{const l=s.matches('[role="menuitemcheckbox"]'),u=s.matches('[role="menuitemradio"]');if((l||u)&&(s.getAttribute("role")!==r||s.closest(this.parentGroupSelector)!==i))return;const d=l||this.multi,f=u||!d,h=s===n,p=s.matches(`[${this.childSelectedAttr}="true"]`),g=s.getAttribute("aria-controls"),m=g?document.getElementById(g):null;d&&h&&(o||a)&&(s.setAttribute(this.childSelectedAttr,String(!p)),s.dispatchEvent(new CustomEvent("Change",{detail:{[this.childSelectedProp]:!p}})),p||s.dispatchEvent(new CustomEvent("Select"))),f&&p!==h&&(!u||a||o)&&(s.setAttribute(this.childSelectedAttr,String(h)),s.dispatchEvent(new CustomEvent("Change",{detail:{[this.childSelectedProp]:h}})),h&&(e.type==="keydown"&&s.matches('[role="radio"]')&&s.click(),s.dispatchEvent(new CustomEvent("Select")))),this.focusChild?globalThis.requestAnimationFrame(()=>{s.tabIndex=h?0:-1,h&&(s.focus(),s.dispatchEvent(new CustomEvent("Focus")))}):(s.classList.toggle("focused",h),h&&s.dispatchEvent(new CustomEvent("Focus"))),m&&(m.inert=!h,m.setAttribute("aria-hidden",String(!h)),h&&globalThis.setTimeout(()=>{try{m.scrollIntoView({block:"nearest",inline:"nearest",behavior:"auto"})}catch{m.scrollIntoView(!0)}},300)),h&&(this.parent.setAttribute("aria-activedescendant",s.id),globalThis.setTimeout(()=>{try{s.scrollIntoView({block:"nearest",inline:"nearest",behavior:"auto"})}catch{s.scrollIntoView(!0)}},300))}),this.parent.dispatchEvent(new CustomEvent("Change",{detail:fL(n)}))}onClick(e){const n=e.target,r=n.matches(this.selector)?n:n.closest(this.selector);!r||e.button!==0||!this.clickToSelect||this.selectTarget(e,r)}onKeyDown(e){const{key:n,ctrlKey:r,metaKey:i,shiftKey:o,altKey:a}=e;if(o||a||r||i)return;const l=e.target,{allMembers:u,activeMembers:d}=this,f=(()=>{if(!this.focusChild)return d.find(g=>g.matches(".focused"));if(l.matches(this.selector))return l})();if(["Enter"," ","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(n)&&e.preventDefault(),n==="Enter"){f?.click();return}if(n===" "){f&&this.selectTarget(e,f);return}let h,p;if(this.grid){const g=Math.floor(this.parent.clientWidth/d[0].clientWidth),m=oe(Gl);h=f?u.indexOf(f):-1,n==="ArrowUp"&&h>0&&(p=u[h-g]),n==="ArrowDown"&&h<u.length-1&&(p=u[h+g]),n==="ArrowLeft"&&h>0&&(p=u[h+(m?1:-1)]),n==="ArrowRight"&&h<u.length-1&&(p=u[h+(m?-1:1)]),p?.matches('[aria-disabled="true"], [aria-hidden="true"]')&&(p=void 0)}else{h=f?d.indexOf(f):-1;const g=oe(Gl),m=this.orientation==="horizontal"?g?"ArrowRight":"ArrowLeft":"ArrowUp",v=this.orientation==="horizontal"?g?"ArrowLeft":"ArrowRight":"ArrowDown";n===m&&(h>0&&(p=d[h-1]),h===0&&(p=d[d.length-1])),n===v&&(h<d.length-1&&(p=d[h+1]),h===d.length-1&&([p]=d))}p&&p!==f&&this.selectTarget(e,p)}onUpdate({searchTerms:e}){const n=lE(e),r=n?n.split(/\s+/):[],i=this.allMembers.map(o=>{const a=lE(o.dataset.searchValue??o.dataset.label??o.querySelector(".label")?.textContent??o.textContent??""),s=!r.every(l=>a.includes(l));return o.dispatchEvent(new CustomEvent("Toggle",{detail:{hidden:s}})),s}).filter(o=>!o).length;this.parent.dispatchEvent(new CustomEvent("Filter",{detail:{matched:i,total:this.allMembers.length}}))}};const gd=(t,e)=>{const n=new tH(t,e);return{update(r){n.onUpdate(r)}}};var nH=j('<div><div role="none" class="inner svelte-q0ed7e"><!></div></div>');const rH={hash:"svelte-q0ed7e",code:".select-button-group.svelte-q0ed7e {flex:none;display:inline-flex;align-items:center;margin:var(--sui-focus-ring-width);}.select-button-group.svelte-q0ed7e:focus-visible {outline-width:0 !important;}.select-button-group.svelte-q0ed7e button {margin:0 !important;border-radius:0 !important;color:var(--sui-primary-foreground-color);}.select-button-group.svelte-q0ed7e button:first-child {border-start-start-radius:4px !important;border-end-start-radius:4px !important;}.select-button-group.svelte-q0ed7e button:not(:first-child) {border-inline-start-width:0;}.select-button-group.svelte-q0ed7e button:last-child {border-start-end-radius:4px !important;border-end-end-radius:4px !important;}.select-button-group.svelte-q0ed7e button[aria-checked=true] {color:var(--sui-highlight-foreground-color);background-color:var(--sui-selected-background-color);}.select-button-group.svelte-q0ed7e [aria-invalid=true] button {border-color:var(--sui-error-border-color);}.select-button-group.svelte-q0ed7e [aria-disabled=false] button[aria-disabled=true] {filter:grayscale(0) opacity(1);}.select-button-group.svelte-q0ed7e [aria-disabled=false] button[aria-disabled=true] * {filter:grayscale(1) opacity(0.35);}.inner.svelte-q0ed7e {display:contents;}"};function Xm(t,e){ke(t,rH);let n=N(e,"hidden",3,!1),r=N(e,"disabled",3,!1),i=N(e,"readonly",3,!1),o=N(e,"required",3,!1),a=N(e,"invalid",3,!1),s=ot(e,["$$slots","$$events","$$legacy","class","hidden","disabled","readonly","required","invalid","children"]);var l=nH();mt(l,()=>({...s,role:"radiogroup",class:`sui select-button-group ${e.class??""}`,hidden:n(),tabindex:"-1","aria-hidden":n(),"aria-disabled":r(),"aria-readonly":i(),"aria-required":o(),"aria-invalid":a()}),void 0,void 0,void 0,"svelte-q0ed7e");var u=F(l),d=F(u);Ue(d,()=>e.children??He),Vs(l,f=>gd?.(f)),Z(()=>u.inert=r()),S(t,l)}function Qf(t,e){ae(e,!0);let n=N(e,"selected",15,!1),r=ot(e,["$$slots","$$events","$$legacy","selected","class","onChange"]);et(t,Qt(()=>r,{role:"radio",get class(){return`sui select-button ${e.class??""}`},get"aria-checked"(){return n()},onChange:i=>{n(i.detail.selected),e.onChange?.(i)}})),se()}var iH=j("<!> <!>",1);function ei(t,e){ae(e,!0);let n=N(e,"hidden",3,!1),r=N(e,"disabled",3,!1),i=N(e,"popupPosition",3,"bottom-left"),o=N(e,"popupPositionBaseElement",3,void 0),a=N(e,"showPopupBackdrop",3,!1),s=N(e,"label",3,""),l=N(e,"variant",3,void 0),u=N(e,"size",3,"medium"),d=N(e,"iconic",3,!1),f=ot(e,["$$slots","$$events","$$legacy","class","hidden","disabled","popupPosition","popupPositionBaseElement","showPopupBackdrop","label","variant","size","iconic","children","startIcon","endIcon","popup"]),h=ie(void 0);var g={focus:()=>{c(h)?.focus()}},m=iH(),v=M(m);et(v,Qt(()=>f,{get class(){return`sui menu-button ${e.class??""}`},get hidden(){return n()},get disabled(){return r()},get label(){return s()},get variant(){return l()},get size(){return u()},get iconic(){return d()},"aria-haspopup":"menu",get element(){return c(h)},set element(E){V(h,E,!0)},startIcon:E=>{var $=X(),A=M($);Ue(A,()=>e.startIcon??He),S(E,$)},children:E=>{var $=X(),A=M($);Ue(A,()=>e.children??He),S(E,$)},endIcon:E=>{var $=X(),A=M($);{var k=C=>{var P=X(),O=M(P);Ue(O,()=>e.endIcon),S(C,P)},T=C=>{var P=X(),O=M(P);{var I=D=>{Qe(D,{name:"more_vert"})},L=D=>{Qe(D,{name:"arrow_drop_down",class:"small-arrow"})};U(O,D=>{d()?D(I):D(L,!1)},!0)}S(C,P)};U(A,C=>{e.endIcon?C(k):C(T,!1)})}S(E,$)},$$slots:{startIcon:!0,default:!0,endIcon:!0}}));var b=z(v,2);return Ym(b,{get anchor(){return c(h)},get position(){return i()},get positionBaseElement(){return o()},get showBackdrop(){return a()},children:(y,w)=>{var x=X(),E=M(x);Ue(E,()=>e.popup??He),S(y,x)},$$slots:{default:!0}}),S(t,m),se(g)}var oH=j('<div role="group" class="sui split-button svelte-1l9p4yu"><!> <!></div>');const aH={hash:"svelte-1l9p4yu",code:".split-button.svelte-1l9p4yu {flex:none;display:inline-flex;margin:var(--sui-focus-ring-width);}.split-button.svelte-1l9p4yu button {margin:0;}.split-button.svelte-1l9p4yu button.menu-button {border-inline-start-width:0;border-start-start-radius:0;border-end-start-radius:0;aspect-ratio:3/4;}.split-button.svelte-1l9p4yu button:not(.menu-button) {border-start-end-radius:0;border-end-end-radius:0;}"};function hL(t,e){ae(e,!0),ke(t,aH);const n=()=>H(ce,"$_",r),[r,i]=ve();let o=N(e,"hidden",3,!1),a=N(e,"disabled",3,!1),s=N(e,"label",3,""),l=N(e,"variant",3,void 0),u=N(e,"size",3,"medium"),d=N(e,"popupPosition",3,"bottom-left"),f=N(e,"showPopupBackdrop",3,!1),h=ot(e,["$$slots","$$events","$$legacy","hidden","disabled","label","variant","size","popupPosition","showPopupBackdrop","chevronIcon","popup"]),p=ie(void 0);var g=oH(),m=F(g);et(m,Qt(()=>h,{get hidden(){return o()},get disabled(){return a()},get label(){return s()},get variant(){return l()},get size(){return u()}}));var v=z(m,2);{const b=x=>{var E=X(),$=M(E);{var A=T=>{var C=X(),P=M(C);Ue(P,()=>e.chevronIcon),S(T,C)},k=T=>{Qe(T,{name:"arrow_drop_down",class:"small-arrow"})};U($,T=>{e.chevronIcon?T(A):T(k,!1)})}S(x,E)},y=x=>{var E=X(),$=M(E);Ue($,()=>e.popup??He),S(x,E)};let w=_(()=>n()("_sui.split_button.more_options"));ei(v,{iconic:!0,get hidden(){return o()},get disabled(){return a()},get variant(){return l()},get size(){return u()},get"aria-label"(){return c(w)},get popupPosition(){return d()},get popupPositionBaseElement(){return c(p)},get showPopupBackdrop(){return f()},endIcon:b,popup:y,$$slots:{endIcon:!0,popup:!0}})}St(g,b=>V(p,b),()=>c(p)),Z(b=>{Se(g,"hidden",o()),Se(g,"aria-hidden",o()),Se(g,"aria-disabled",a()),Se(g,"aria-label",b)},[()=>n()("_sui.split_button.x_options",{values:{name:s()}})]),S(t,g),se(),i()}var sH=j("<div></div>");const lH={hash:"svelte-1xmc0tz",code:".divider.svelte-1xmc0tz {flex:none;background-color:var(--sui-secondary-border-color);}.divider[aria-orientation=horizontal].svelte-1xmc0tz {margin:8px 0;width:100%;height:1px;}.divider[aria-orientation=vertical].svelte-1xmc0tz {margin:0 8px;width:1px;height:100%;}"};function vi(t,e){ke(t,lH);let n=N(e,"hidden",3,!1),r=N(e,"orientation",3,"horizontal"),i=ot(e,["$$slots","$$events","$$legacy","class","hidden","orientation"]);var o=sH();mt(o,()=>({...i,role:"separator",class:`sui divider ${e.class??""}`,hidden:n(),"aria-hidden":n(),"aria-orientation":r()}),void 0,void 0,void 0,"svelte-1xmc0tz"),S(t,o)}var cH=j("<div></div>");const uH={hash:"svelte-12wucim",code:".spacer.flex.svelte-12wucim {flex:auto;}.spacer.svelte-12wucim:not(.flex) {width:8px;height:8px;}"};function _i(t,e){ke(t,uH);let n=N(e,"flex",3,!1),r=ot(e,["$$slots","$$events","$$legacy","class","flex"]);var i=cH();mt(i,()=>({...r,role:"none",class:`sui spacer ${e.class??""}`,[Nr]:{flex:n()}}),void 0,void 0,void 0,"svelte-12wucim"),S(t,i)}lc(["click"]);var dH=j('<div><div role="none" class="inner svelte-osk3rl"><!></div></div>');const fH={hash:"svelte-osk3rl",code:`.checkbox-group.svelte-osk3rl {display:inline-flex;}.checkbox-group.horizontal.svelte-osk3rl {gap:8px;align-items:center;flex-wrap:wrap;}.checkbox-group.vertical.svelte-osk3rl {gap:4px;flex-direction:column;}
|
|
351
|
-
@media (pointer: coarse) {.checkbox-group.vertical.svelte-
|
|
352
|
-
}.inner.svelte-
|
|
353
|
-
@media (max-height: 400px) {.content.small.svelte-
|
|
354
|
-
}.content.medium.svelte-
|
|
355
|
-
@media (max-height: 600px) {.content.medium.svelte-
|
|
356
|
-
}.content.large.svelte-
|
|
357
|
-
@media (max-height: 800px) {.content.large.svelte-
|
|
358
|
-
}.content.x-large.svelte-
|
|
359
|
-
@media (max-height: 1000px) {.content.x-large.svelte-
|
|
360
|
-
}:is(.header.svelte-
|
|
361
|
-
@media (width < 768px) {.footer.svelte-
|
|
362
|
-
}.body.svelte-
|
|
363
|
-
@media (width < 768px) {.body.svelte-
|
|
364
|
-
}`};function xo(t,e){const n=Jn();ae(e,!0),ke(t,xH);const r=()=>H(ce,"$_",i),[i,o]=ve();let a=N(e,"open",15,!1);N(e,"value",11,"");let s=N(e,"role",3,"dialog"),l=N(e,"size",3,"medium"),u=N(e,"showClose",3,!1),d=N(e,"showOk",3,!0),f=N(e,"showCancel",3,!0),h=N(e,"okLabel",3,""),p=N(e,"okShortcuts",3,void 0),g=N(e,"okDisabled",3,!1),m=N(e,"cancelLabel",3,""),v=N(e,"cancelShortcuts",3,void 0),b=N(e,"cancelDisabled",3,!1),y=N(e,"focusInput",3,!0),w=ot(e,["$$slots","$$events","$$legacy","open","value","title","role","size","class","showClose","showOk","showCancel","okLabel","okShortcuts","okDisabled","cancelLabel","cancelShortcuts","cancelDisabled","focusInput","children","header","headerExtra","footer","footerExtra","closeIcon","input"]),x=ie(void 0),E=ie(void 0);ze(()=>{a()&&c(E)&&(async()=>(await Rt(50),y()?(c(E)?.querySelector("input, button.primary")?.focus(),c(E)?.querySelector("input")?.select()):c(x)?.focus()))()});{let $=_(()=>e.header?void 0:e.title),A=_(()=>e.header?e.title:`${n}-title`);St(uL(t,Qt(()=>w,{get role(){return s()},get id(){return n},class:"dialog",get"aria-label"(){return c($)},get"aria-labelledby"(){return c(A)},get"aria-describedby"(){return`${n}-body`},showBackdrop:!0,get open(){return a()},set open(k){a(k)},children:(k,T)=>{var C=wH(),P=F(C);{var O=K=>{var G=_H(),W=F(G);{var Y=q=>{var J=X(),Q=M(J);Ue(Q,()=>e.header),S(q,J)},R=q=>{var J=vH(),Q=M(J),ee=F(Q),re=z(Q,2);_i(re,{flex:!0});var te=z(re,2);Ue(te,()=>e.headerExtra??He);var de=z(te,2);{var he=ue=>{{const ge=me=>{var Ae=X(),Ce=M(Ae);{var _e=be=>{var Oe=X(),je=M(Oe);Ue(je,()=>e.closeIcon),S(be,Oe)},fe=be=>{Qe(be,{name:"close"})};U(Ce,be=>{e.closeIcon?be(_e):be(fe,!1)})}S(me,Ae)};let ye=_(()=>r()("_sui.close"));et(ue,{variant:"ghost",iconic:!0,get"aria-label"(){return c(ye)},get"aria-controls"(){return n},onclick:()=>{c(x)?.close("close")},startIcon:ge,$$slots:{startIcon:!0}})}};U(de,ue=>{u()&&ue(he)})}Z(()=>{Se(Q,"id",`${n}-title`),ne(ee,e.title)}),S(q,J)};U(W,q=>{e.header?q(Y):q(R,!1)})}S(K,G)};U(P,K=>{(e.title||u()||e.header||e.headerExtra)&&K(O)})}var I=z(P,2),L=F(I);Ue(L,()=>e.children??He);var D=z(I,2);{var B=K=>{var G=yH(),W=F(G);{var Y=q=>{var J=X(),Q=M(J);Ue(Q,()=>e.footer??He),S(q,J)},R=q=>{var J=bH(),Q=M(J);Ue(Q,()=>e.footerExtra??He);var ee=z(Q,2);_i(ee,{flex:!0});var re=z(ee,2);{var te=ue=>{{let ge=_(()=>h()||r()("_sui.ok"));et(ue,{variant:"primary",get label(){return c(ge)},get keyShortcuts(){return p()},get disabled(){return g()},onclick:()=>{c(x)?.close("ok")}})}};U(re,ue=>{d()&&ue(te)})}var de=z(re,2);{var he=ue=>{{let ge=_(()=>m()||r()("_sui.cancel"));et(ue,{variant:"secondary",get label(){return c(ge)},get keyShortcuts(){return v()},get disabled(){return b()},onclick:()=>{c(x)?.close("cancel")}})}};U(de,ue=>{f()&&ue(he)})}S(q,J)};U(W,q=>{e.footer?q(Y):q(R,!1)})}S(K,G)};U(D,K=>{(d()||f()||e.footer||e.footerExtra)&&K(B)})}St(C,K=>V(E,K),()=>c(E)),Z(()=>{hn(C,1,`content ${e.class??""} ${l()??""}`,"svelte-
|
|
365
|
-
.label.svelte-
|
|
366
|
-
@media (pointer: coarse) {[role=listbox].svelte-
|
|
367
|
-
}[role=listbox].svelte-
|
|
368
|
-
@media (pointer: coarse) {.menu.svelte-
|
|
369
|
-
}.menu.svelte-
|
|
370
|
-
@media (pointer: coarse) {.radio-group.vertical.svelte-
|
|
371
|
-
}.radio-group.svelte-20o2bd [aria-invalid=true] button {border-color:var(--sui-error-border-color);}.radio-group.svelte-20o2bd [aria-invalid=true] button[aria-checked=true] {border-color:var(--sui-error-border-color);}.radio-group.svelte-20o2bd [aria-invalid=true] button[aria-checked=true]::before {background-color:var(--sui-error-border-color);}.inner.svelte-20o2bd {display:contents;}`};function r9(t,e){ae(e,!0),ke(t,n9);let n=N(e,"hidden",3,!1),r=N(e,"disabled",3,!1),i=N(e,"readonly",3,!1),o=N(e,"required",3,!1),a=N(e,"invalid",3,!1),s=N(e,"orientation",3,"horizontal"),l=ot(e,["$$slots","$$events","$$legacy","class","hidden","disabled","readonly","required","invalid","orientation","children","onChange"]);var u=t9(),d=p=>{e.onChange?.(p)};mt(u,()=>({...l,role:"radiogroup",class:`sui radio-group ${e.class??""} ${s()??""}`,tabindex:"-1",hidden:n(),"aria-hidden":n(),"aria-disabled":r(),"aria-readonly":i(),"aria-required":o(),"aria-invalid":a(),"aria-orientation":s(),onChange:d}),void 0,void 0,void 0,"svelte-20o2bd");var f=F(u),h=F(f);Ue(h,()=>e.children??He),Vs(u,p=>gd?.(p)),Z(()=>f.inert=r()),S(t,u),se()}var i9=j('<label class="svelte-1tt0frj"><!></label>'),o9=j("<span><!> <!></span>");const a9={hash:"svelte-1tt0frj",code:'.radio.svelte-1tt0frj {display:inline-flex;align-items:center;gap:8px;margin:var(--sui-focus-ring-width);color:var(--sui-control-foreground-color);font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);cursor:pointer;-webkit-user-select:none;user-select:none;}.radio.svelte-1tt0frj :hover button {background-color:var(--sui-hover-background-color);}.radio.svelte-1tt0frj :hover button[aria-checked=true] {border-color:var(--sui-primary-accent-color-light);color:var(--sui-primary-accent-color-text);}.radio.svelte-1tt0frj :hover button[aria-checked=true]::before {background-color:var(--sui-primary-accent-color-light);}.radio.svelte-1tt0frj :active button {background-color:var(--sui-active-background-color);}.radio.svelte-1tt0frj :active button[aria-checked=true] {border-color:var(--sui-primary-accent-color-dark);color:var(--sui-primary-accent-color-dark);}.radio.svelte-1tt0frj button {flex:none;justify-content:center;overflow:hidden;margin:0 !important;border-width:1.5px;border-color:var(--sui-checkbox-border-color);border-radius:var(--sui-checkbox-height);padding:0;width:var(--sui-checkbox-height);height:var(--sui-checkbox-height);background-color:var(--sui-checkbox-background-color);transition:all 200ms;}.radio.svelte-1tt0frj button::before {content:"";border-radius:var(--sui-checkbox-height);width:calc(var(--sui-checkbox-height) - 7px);height:calc(var(--sui-checkbox-height) - 7px);background-color:var(--sui-primary-accent-color);opacity:0;transition:all 200ms;will-change:opacity;}.radio.svelte-1tt0frj button[aria-checked=true] {border-color:var(--sui-primary-accent-color);}.radio.svelte-1tt0frj button[aria-checked=true]::before {opacity:1;}.radio.svelte-1tt0frj label:where(.svelte-1tt0frj) {cursor:inherit;}'};function s9(t,e){const n=Jn();ae(e,!0),ke(t,a9);let r=N(e,"checked",7,!1),i=N(e,"hidden",3,!1),o=N(e,"disabled",3,!1),a=N(e,"name",3,void 0),s=N(e,"value",3,void 0),l=N(e,"valueType",3,void 0),u=N(e,"label",3,void 0),d=N(e,"group",15),f=ot(e,["$$slots","$$events","$$legacy","checked","class","hidden","disabled","name","value","valueType","label","group","children","onChange","onSelect"]),h=ie(void 0);ze(()=>{typeof d()=="string"&&(d()===s()?r()||r(!0):r()&&r(!1))});var p=o9(),g=y=>{y.target.matches("button")||c(h)?.click()};mt(p,()=>({...f,role:"none",class:`sui radio ${e.class??""}`,hidden:i(),onclick:g,[Nr]:{disabled:o()}}),void 0,void 0,void 0,"svelte-1tt0frj");var m=F(p);et(m,{role:"radio",get id(){return n},get hidden(){return i()},get disabled(){return o()},get name(){return a()},get value(){return s()},get valueType(){return l()},get"aria-checked"(){return r()},get"aria-labelledby"(){return`${n}-label`},onclick:y=>{y.preventDefault(),!(o()||r())&&(r(!0),typeof d()=="string"&&d(s()))},get onChange(){return e.onChange},get onSelect(){return e.onSelect},get element(){return c(h)},set element(y){V(h,y,!0)}});var v=z(m,2);{var b=y=>{var w=i9(),x=F(w);{var E=A=>{var k=X(),T=M(k);Ue(T,()=>e.children??He),S(A,k)},$=A=>{var k=Fe();Z(()=>ne(k,u())),S(A,k)};U(x,A=>{e.children?A(E):A($,!1)})}Z(()=>Se(w,"id",`${n}-label`)),S(y,w)};U(v,y=>{(e.children||u())&&y(b)})}S(t,p),se()}var l9=j('<div role="none" class="spinner svelte-6z0dz4"></div>'),c9=j("<!> <!>",1);const u9={hash:"svelte-6z0dz4",code:".spinner.svelte-6z0dz4 {height:1px;}"};function _c(t,e){ae(e,!0),ke(t,u9);let n=N(e,"itemChunkSize",3,25),r=_(n),i=ie(void 0);const o=_(()=>e.items.length>c(r)),a=new IntersectionObserver(([{isIntersecting:f}])=>{f&&(c(o)?V(r,c(r)+n()):a.disconnect())});ze(()=>{c(i)&&a.observe(c(i))});var s=c9(),l=M(s);rt(l,19,()=>e.items.slice(0,c(r)),(f,h)=>f[e.itemKey]??h,(f,h,p)=>{var g=X(),m=M(g);Ue(m,()=>e.renderItem,()=>c(h),()=>c(p)),S(f,g)});var u=z(l,2);{var d=f=>{var h=l9();St(h,p=>V(i,p),()=>c(i)),S(f,h)};U(u,f=>{c(o)&&f(d)})}S(t,s),se()}var d9=j('<div><span role="none" class="svelte-1icv3ev"><!></span> <!> <!></div>');const f9={hash:"svelte-1icv3ev",code:".search-bar.svelte-1icv3ev {display:inline-flex;align-items:center;position:relative;margin:var(--sui-focus-ring-width);min-width:var(--sui-textbox-singleline-min-width);}.search-bar.flex.svelte-1icv3ev {width:-moz-available;width:-webkit-fill-available;width:stretch;min-width:0;}.search-bar.svelte-1icv3ev > span:where(.svelte-1icv3ev) {position:absolute;inset-block:0;inset-inline-start:0;inset-inline-end:auto;z-index:2;display:flex;align-items:center;justify-content:center;width:var(--sui-button-medium-height);height:var(--sui-button-medium-height);}.search-bar.svelte-1icv3ev .icon {font-size:calc(var(--sui-textbox-height) * 0.6);opacity:0.5;}.search-bar.svelte-1icv3ev > button {position:absolute;inset-block:0;inset-inline-start:auto;inset-inline-end:0;z-index:2;margin:0 !important;height:var(--sui-button-medium-height);}.search-bar.svelte-1icv3ev .label {--sui-textbox-singleline-padding: 0 36px;}.search-bar.svelte-1icv3ev .text-input {flex:auto;margin:0 !important;width:0;min-width:0 !important;}.search-bar.svelte-1icv3ev input {z-index:1;padding:0 var(--sui-button-medium-height) !important;width:100%;}"};function Qm(t,e){const n=Jn();ae(e,!0),ke(t,f9);const r=()=>H(ce,"$_",i),[i,o]=ve();let a=N(e,"value",15),s=N(e,"flex",3,!1),l=N(e,"hidden",3,!1),u=N(e,"disabled",3,!1),d=N(e,"readonly",3,!1),f=N(e,"required",3,!1),h=N(e,"invalid",3,!1),p=ot(e,["$$slots","$$events","$$legacy","value","flex","class","hidden","disabled","readonly","required","invalid","children","searchIcon","closeIcon"]),g=ie(void 0);var v={focus:()=>{c(g)?.focus()}},b=d9();let y;var w=F(b),x=F(w);{var E=P=>{var O=X(),I=M(O);Ue(I,()=>e.searchIcon),S(P,O)},$=P=>{Qe(P,{name:"search"})};U(x,P=>{e.searchIcon?P(E):P($,!1)})}var A=z(w,2);Yn(A,Qt(()=>p,{role:"searchbox",get id(){return n},get flex(){return s()},get hidden(){return l()},get disabled(){return u()},get readonly(){return d()},get required(){return f()},get invalid(){return h()},inputmode:"search",get element(){return c(g)},set element(P){V(g,P,!0)},get value(){return a()},set value(P){a(P)}}));var k=z(A,2);{var T=P=>{{const O=L=>{var D=X(),B=M(D);{var K=W=>{var Y=X(),R=M(Y);Ue(R,()=>e.closeIcon),S(W,Y)},G=W=>{Qe(W,{name:"close"})};U(B,W=>{e.closeIcon?W(K):W(G,!1)})}S(L,D)};let I=_(()=>r()("_sui.clear"));et(P,{iconic:!0,get"aria-label"(){return c(I)},get"aria-controls"(){return n},onclick:()=>{a(""),c(g)?.focus(),globalThis.requestIdleCallback(()=>{c(g)?.dispatchEvent(new KeyboardEvent("input")),c(g)?.dispatchEvent(new KeyboardEvent("keypress")),c(g)?.dispatchEvent(new KeyboardEvent("change"))})},startIcon:O,$$slots:{startIcon:!0}})}};U(k,P=>{a()&&P(T)})}Z(()=>{Se(b,"role",l()?void 0:"none"),y=hn(b,1,`sui search-bar ${e.class??""}`,"svelte-1icv3ev",y,{flex:s(),disabled:u(),readonly:d()}),Se(b,"hidden",l()),Se(b,"aria-hidden",l())}),S(t,b);var C=se(v);return o(),C}var h9=j('<div><div role="none" class="label svelte-4b3tdy"><!></div></div>'),p9=j('<div role="alert" class="no-options svelte-4b3tdy"> </div>'),g9=j('<div role="none" class="combobox-inner svelte-4b3tdy"><!> <!> <!></div>'),m9=j("<div><!> <!></div> <!>",1);const v9={hash:"svelte-4b3tdy",code:`.combobox.svelte-4b3tdy {margin:var(--sui-focus-ring-width);display:flex;align-items:center;position:relative;min-width:var(--sui-combobox-min-width, calc(var(--sui-option-height) * 5));}.combobox.svelte-4b3tdy div[role=combobox]:where(.svelte-4b3tdy) {display:flex;align-items:center;border-width:1px;border-color:var(--sui-control-border-color);border-radius:var(--sui-textbox-border-radius);padding-block:0;padding-inline-start:calc(var(--sui-textbox-height) / 4);padding-inline-end:var(--sui-textbox-height);width:100%;height:var(--sui-textbox-height);color:var(--sui-control-foreground-color);background-color:var(--sui-disabled-background-color);font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);-webkit-user-select:none;user-select:none;cursor:pointer;transition:all 200ms;}.combobox.svelte-4b3tdy div[role=combobox]:where(.svelte-4b3tdy):not(.selected) {font-style:italic;}.combobox.svelte-4b3tdy div[role=combobox]:where(.svelte-4b3tdy):is(:where(.svelte-4b3tdy):hover, :where(.svelte-4b3tdy):focus) {background-color:var(--sui-hover-background-color);}.combobox.svelte-4b3tdy div[role=combobox][aria-invalid=true]:where(.svelte-4b3tdy) {border-color:var(--sui-error-border-color);}.combobox.svelte-4b3tdy div[role=combobox]:where(.svelte-4b3tdy) .label:where(.svelte-4b3tdy) {width:100%;}.combobox.svelte-4b3tdy .icon {font-size:var(--sui-font-size-xx-large);opacity:0.5;}.combobox.svelte-4b3tdy > .icon {position:absolute;inset-block-start:8px;inset-inline-start:8px;z-index:1;}.combobox.svelte-4b3tdy > button {position:absolute;inset-block-start:0;inset-inline-end:0;z-index:1;margin:0 !important;border-start-start-radius:0;border-end-start-radius:0;background-color:transparent !important;}.combobox.svelte-4b3tdy > button[tabindex="-1"] {pointer-events:none;}.combobox.svelte-4b3tdy :not(.editable) > button {background-color:transparent !important;}.combobox.svelte-4b3tdy .text-input {margin:0 !important;width:100% !important;}.combobox.svelte-4b3tdy input {padding-block:0;padding-inline:8px 32px;width:0;}.combobox.svelte-4b3tdy + [role=listbox] {position:fixed;z-index:100;border-radius:var(--sui-control-medium-border-radius);box-shadow:0 8px 16px var(--sui-popup-shadow-color);overflow:auto;background-color:var(--sui-secondary-background-color);-webkit-backdrop-filter:blur(32px);backdrop-filter:blur(32px);
|
|
372
|
-
/* Add .1s delay before the position can be determined */transition:opacity 100ms 100ms;}.combobox.svelte-4b3tdy + [role=listbox]:not(.open) {opacity:0;pointer-events:none;}.combobox-inner.svelte-4b3tdy {display:flex;flex-direction:column;overflow:hidden;}.combobox-inner.svelte-4b3tdy .sui.search-bar {flex:none;}.combobox-inner.svelte-4b3tdy .sui.listbox {flex:auto;overflow-y:auto;}.combobox-inner.svelte-4b3tdy .no-options:where(.svelte-4b3tdy) {flex:none;display:flex;align-items:center;padding:var(--sui-option-padding);height:var(--sui-option-height);color:var(--sui-tertiary-foreground-color);}`};function _9(t,e){const n=Jn();ae(e,!0),ke(t,v9);const r=()=>H(ce,"$_",i),[i,o]=ve();let a=N(e,"value",15),s=N(e,"hidden",3,!1),l=N(e,"disabled",3,!1),u=N(e,"readonly",3,!1),d=N(e,"required",3,!1),f=N(e,"invalid",3,!1),h=N(e,"editable",3,!0),p=N(e,"position",3,"bottom-left"),g=N(e,"filterThreshold",3,5),m=ot(e,["$$slots","$$events","$$legacy","value","class","hidden","disabled","readonly","required","invalid","editable","position","filterThreshold","children","chevronIcon","onChange"]);const v='[role="option"][aria-selected="true"]';let b=ie(!1),y=ie(void 0),w=ie(void 0),x=ie(void 0),E=ie(""),$=ie(!1),A=ie(""),k=ie(!0);const T=_(()=>c(y)??c(w)),C=()=>{const W=c(x)?.querySelector(v),Y=c(x)?.querySelector(`[role="option"][data-value="${a()}"]`);Y&&(V(E,Y.dataset.label||Y.dataset.value||Y.textContent||"",!0),W!==Y&&(W?.setAttribute("aria-selected","false"),Y.setAttribute("aria-selected","true")))},P=W=>{const Y=fL(W);a(Y.value),C(),e.onChange?.(new CustomEvent("Change",{detail:Y}))};ze(()=>{c(x)&&globalThis.requestAnimationFrame(()=>{const W=c(x)?.querySelector(v);W&&P(W)})}),ze(()=>{a(),C()});var O=m9(),I=M(O);mt(I,()=>({...m,role:"none",class:`sui combobox ${e.class??""}`,hidden:s(),[Nr]:{editable:h()}}),void 0,void 0,void 0,"svelte-4b3tdy");var L=F(I);{var D=W=>{var Y=h9();mt(Y,()=>({...m,role:"combobox",id:n,tabindex:l()?-1:0,"aria-controls":`${n}-popup`,"aria-expanded":c(b),"aria-hidden":s(),"aria-disabled":l(),"aria-readonly":u(),"aria-required":d(),"aria-invalid":f(),"aria-haspopup":"listbox",[Nr]:{selected:a()!==void 0}}),void 0,void 0,void 0,"svelte-4b3tdy");var R=F(Y),q=F(R);Ur(q,{children:(J,Q)=>{var ee=Fe();Z(re=>ne(ee,re),[()=>a()!==void 0?c(E):r()("_sui.combobox.select_an_option")]),S(J,ee)},$$slots:{default:!0}}),St(Y,J=>V(y,J),()=>c(y)),S(W,Y)},B=W=>{{let Y=_(()=>a()===void 0?"":String(a()));Yn(W,Qt(()=>m,{role:"combobox",get id(){return n},get value(){return c(Y)},get hidden(){return s()},get disabled(){return l()},get readonly(){return u()},get required(){return d()},get invalid(){return f()},get"aria-controls"(){return`${n}-popup`},get"aria-expanded"(){return c(b)},"aria-haspopup":"listbox",get element(){return c(w)},set element(R){V(w,R,!0)}}))}};U(L,W=>{h()?W(B,!1):W(D)})}var K=z(L,2);{const W=q=>{var J=X(),Q=M(J);{var ee=te=>{var de=X(),he=M(de);Ue(he,()=>e.chevronIcon),S(te,de)},re=te=>{Qe(te,{name:"expand_more"})};U(Q,te=>{e.chevronIcon?te(ee):te(re,!1)})}S(q,J)};let Y=_(()=>!h()||u()||l()?-1:0),R=_(()=>c(b)?r()("_sui.collapse"):r()("_sui.expand"));et(K,{variant:"ghost",iconic:!0,get hidden(){return s()},get disabled(){return l()},get tabindex(){return c(Y)},get"aria-label"(){return c(R)},get"aria-controls"(){return`${n}-popup`},get"aria-expanded"(){return c(b)},onclick:q=>{q.preventDefault(),q.stopPropagation(),!l()&&!u()&&V(b,!c(b))},startIcon:W,$$slots:{startIcon:!0}})}var G=z(I,2);Ym(G,{get id(){return`${n}-popup`},class:"combobox",get anchor(){return c(T)},get position(){return p()},touchOptimized:!0,onOpen:()=>{V($,g()===-1?!1:(c(x)?.querySelectorAll('[role="option"]')?.length??0)>g(),!0),V(A,"")},get content(){return c(x)},set content(W){V(x,W,!0)},get open(){return c(b)},set open(W){V(b,W,!0)},children:(W,Y)=>{var R=g9(),q=F(R);{var J=te=>{{let de=_(()=>r()("_sui.combobox.filter_options"));Qm(te,{flex:!0,get"aria-label"(){return c(de)},get"aria-controls"(){return`${n}-listbox`},onkeydown:he=>{["ArrowUp","ArrowDown","Enter"].includes(he.key)&&(he.preventDefault(),c(x)?.querySelector(".sui.listbox")?.dispatchEvent(new KeyboardEvent("keydown",he)))},get value(){return c(A)},set value(he){V(A,he,!0)}})}};U(q,te=>{c($)&&te(J)})}var Q=z(q,2);vd(Q,{get id(){return`${n}-listbox`},class:"in-combobox",get searchTerms(){return c(A)},onclick:te=>{te.target.matches('[role="option"]')&&P(te.target)},onFilter:te=>{V(k,!!te.detail.matched)},children:(te,de)=>{var he=X(),ue=M(he);Ue(ue,()=>e.children??He),S(te,he)},$$slots:{default:!0}});var ee=z(Q,2);{var re=te=>{var de=p9(),he=F(de);Z(ue=>ne(he,ue),[()=>r()("_sui.combobox.no_matching_options")]),S(te,de)};U(ee,te=>{c(k)||te(re)})}S(W,R)},$$slots:{default:!0}}),S(t,O),se(),o()}function bc(t,e){ae(e,!0);let n=N(e,"value",15),r=N(e,"hidden",3,!1),i=N(e,"disabled",3,!1),o=N(e,"readonly",3,!1),a=N(e,"required",3,!1),s=N(e,"invalid",3,!1),l=ot(e,["$$slots","$$events","$$legacy","value","class","hidden","disabled","readonly","required","invalid","children","onChange"]);_9(t,Qt(()=>l,{get class(){return`sui select ${e.class??""}`},get hidden(){return r()},get disabled(){return i()},get readonly(){return o()},get required(){return a()},get invalid(){return s()},get onChange(){return e.onChange},editable:!1,get value(){return n()},set value(u){n(u)},children:(u,d)=>{var f=X(),h=M(f);Ue(h,()=>e.children??He),S(u,f)},$$slots:{default:!0}})),se()}var b9=j('<span role="none" class="svelte-15140nn"> <!></span>'),y9=j('<div role="none"><!> <!></div>');const w9={hash:"svelte-15140nn",code:".select-tags.svelte-15140nn {display:flex;flex-wrap:wrap;align-items:center;}.select-tags.disabled.svelte-15140nn {pointer-events:none;}.select-tags.disabled.svelte-15140nn > :where(.svelte-15140nn) {opacity:0.5;}.select-tags.svelte-15140nn span:where(.svelte-15140nn) {display:inline-flex;align-items:center;margin:var(--sui-focus-ring-width);padding:0;padding-inline-start:8px;border-radius:var(--sui-control-medium-border-radius);background-color:var(--sui-secondary-background-color);}.select-tags.svelte-15140nn span:where(.svelte-15140nn) .icon {font-size:var(--sui-font-size-large);}"};function x9(t,e){ae(e,!0),ke(t,w9);const n=()=>H(ce,"$_",r),[r,i]=ve();let o=N(e,"values",31,()=>At([])),a=N(e,"max",3,void 0),s=N(e,"hidden",3,!1),l=N(e,"disabled",3,!1),u=N(e,"readonly",3,!1),d=N(e,"required",3,!1),f=N(e,"invalid",3,!1),h=ot(e,["$$slots","$$events","$$legacy","values","options","max","class","hidden","disabled","readonly","required","invalid","children","onAddValue","onRemoveValue"]),p=ie(void 0);var g=y9();let m;var v=F(g);rt(v,17,o,yr,(w,x)=>{const E=_(()=>e.options.find(T=>T.value===c(x)));var $=X(),A=M($);{var k=T=>{var C=b9(),P=F(C),O=z(P);{const I=B=>{Qe(B,{name:"close"})};let L=_(()=>l()||u()),D=_(()=>n()("remove_x",{values:{name:c(E).label}}));et(O,{iconic:!0,size:"small",get disabled(){return c(L)},get"aria-label"(){return c(D)},onclick:()=>{o(o().filter(B=>B!==c(x))),e.onRemoveValue?.(new CustomEvent("RemoveValue",{detail:{value:c(x)}}))},startIcon:I,$$slots:{startIcon:!0}})}Z(()=>ne(P,`${c(E).label??""} `)),S(T,C)};U(A,T=>{c(E)&&T(k)})}S(w,$)});var b=z(v,2);{var y=w=>{{let x=_(()=>l()||u());bc(w,Qt(()=>h,{get disabled(){return c(x)},get readonly(){return u()},get required(){return d()},get invalid(){return f()},onChange:()=>{c(p)&&(o([...o(),c(p)]),e.onAddValue?.(new CustomEvent("AddValue",{detail:{value:c(p)}})),V(p,void 0))},get value(){return c(p)},set value(E){V(p,E,!0)},children:(E,$)=>{var A=X(),k=M(A);rt(k,17,()=>e.options,({label:T,value:C,searchValue:P})=>C,(T,C)=>{let P=()=>c(C).label,O=()=>c(C).value,I=()=>c(C).searchValue;var L=X(),D=M(L);{var B=K=>{Mr(K,{get label(){return P()},get value(){return O()},get searchValue(){return I()}})};U(D,K=>{o().includes(O())||K(B)})}S(T,L)}),S(E,A)},$$slots:{default:!0}}))}};U(b,w=>{(typeof a()!="number"||o().length<a())&&o().length<e.options.length&&w(y)})}Z(()=>{m=hn(g,1,`sui select-tags ${e.class??""}`,"svelte-15140nn",m,{disabled:l()||u()}),Se(g,"hidden",s())}),S(t,g),se(),i()}var k9=j('<div role="slider" class="svelte-syp48v"></div>'),S9=j('<span role="none" class="label svelte-syp48v"> </span>'),E9=j('<div><div role="none" class="base svelte-syp48v"><div role="none" class="base-bar svelte-syp48v"></div> <div class="slider-bar svelte-syp48v"></div> <div role="slider" class="svelte-syp48v"></div> <!> <!></div></div>');const T9={hash:"svelte-syp48v",code:".slider.svelte-syp48v {position:relative;display:inline-block;margin:var(--sui-focus-ring-width);padding:4px 6px;touch-action:none;}.slider.svelte-syp48v:hover .base-bar:where(.svelte-syp48v) {background-color:var(--sui-hover-background-color);}.slider.svelte-syp48v:active .base-bar:where(.svelte-syp48v) {background-color:var(--sui-active-background-color);}.base.svelte-syp48v {position:relative;width:var(--sui-slider-base-width, 240px);height:calc(var(--sui-checkbox-height) / 2);cursor:pointer;}.base-bar.svelte-syp48v {border-width:1px;border-style:solid;border-color:var(--sui-control-border-color);border-radius:var(--sui-checkbox-height);background-color:var(--sui-slider-background-color, var(--sui-secondary-background-color));transition:all 200ms;width:100%;height:100%;}.slider-bar.svelte-syp48v {position:absolute;top:0;height:calc(var(--sui-checkbox-height) / 2);border-radius:var(--sui-checkbox-height);background-color:var(--sui-primary-accent-color-light);}.invalid.svelte-syp48v .slider-bar:where(.svelte-syp48v) {background-color:var(--sui-error-border-color);}[role=slider].svelte-syp48v {position:absolute;top:0;border:3px solid var(--sui-primary-accent-color-light);border-radius:var(--sui-checkbox-height);width:calc(var(--sui-checkbox-height) - 2px);height:calc(var(--sui-checkbox-height) - 2px);background-color:var(--sui-primary-accent-color-inverted);cursor:pointer;}[role=slider].svelte-syp48v:dir(ltr) {transform:translate(calc((var(--sui-checkbox-height) / 2 - 1px) * -1), calc((var(--sui-checkbox-height) / 4 - 1px) * -1));}[role=slider].svelte-syp48v:dir(rtl) {transform:translate(calc(var(--sui-checkbox-height) / 2 - 1px), calc((var(--sui-checkbox-height) / 4 - 1px) * -1));}.invalid.svelte-syp48v [role=slider]:where(.svelte-syp48v) {border-color:var(--sui-error-border-color);}.label.svelte-syp48v {position:absolute;top:calc(var(--sui-checkbox-height) / 2 + 8px);font-size:var(--sui-font-size-x-small);}.label.svelte-syp48v:dir(ltr) {transform:translateX(-50%);}.label.svelte-syp48v:dir(rtl) {transform:translateX(50%);}"};function $9(t,e){ae(e,!0),ke(t,T9);const n=()=>H(Gl,"$isRTL",r),[r,i]=ve();let o=N(e,"value",15,0),a=N(e,"min",3,0),s=N(e,"max",3,100),l=N(e,"sliderLabel",3,""),u=N(e,"values",15,void 0),d=N(e,"sliderLabels",3,void 0),f=N(e,"step",3,1),h=N(e,"optionLabels",19,()=>[]),p=N(e,"hidden",3,!1),g=N(e,"disabled",3,!1),m=N(e,"readonly",3,!1),v=N(e,"invalid",3,!1),b=ot(e,["$$slots","$$events","$$legacy","value","min","max","sliderLabel","values","sliderLabels","step","optionLabels","class","hidden","disabled","readonly","invalid","children","onChange"]);const y=_(()=>Array.isArray(u()));let w=ie(void 0),x=ie(0),E=ie(At([])),$=ie(At([])),A=ie(0),k=ie(0),T=At([0,0]),C=ie(!1),P=ie(0),O=ie(0);const I=ue=>{const ge=n()?c(x)-ue:ue;if(ge<0||ge>c(x))return;const ye=c(E).findLastIndex(fe=>fe<=ge),me=c(E).findIndex(fe=>ge<=fe),Ae=Math.abs(c(E)[ye]-ge),Ce=Math.abs(c(E)[me]-ge),_e=Ae<Ce?ye:me;T[c(O)]===c(E)[_e]||c(y)&&(c(O)===0&&T[1]<=c(E)[_e]||c(O)===1&&T[0]>=c(E)[_e])||(c(y)?(u(u()[c(O)]=c($)[_e],!0),u([...u()])):o(c($)[_e]))},L=(ue,ge=0)=>{const{key:ye,ctrlKey:me,metaKey:Ae,shiftKey:Ce,altKey:_e}=ue,fe=Ce||_e||me||Ae;if(g()||m()||fe)return;const be=c(y)?u()[ge]:o();let Oe=-1;const je=n()?["ArrowDown","ArrowRight"]:["ArrowDown","ArrowLeft"],Re=n()?["ArrowUp","ArrowLeft"]:["ArrowUp","ArrowRight"];if(je.includes(ye)&&(be>a()&&(Oe=c($).indexOf(be)-1),ue.preventDefault(),ue.stopPropagation()),Re.includes(ye)&&(be<s()&&(Oe=c($).indexOf(be)+1),ue.preventDefault(),ue.stopPropagation()),Oe>-1){if(c(y)&&(ge===0&&T[1]<=c(E)[Oe]||ge===1&&T[0]>=c(E)[Oe]))return;c(y)?(u(u()[ge]=c($)[Oe],!0),u([...u()])):o(c($)[Oe])}},D=ue=>{const{screenX:ge,pointerId:ye}=ue;if(g()||m()||!c(C)||ye!==c(P))return;ue.stopPropagation();const me=ge-c(k),Ae=c(A)+me;I(Ae)},B=ue=>{const{pointerId:ge}=ue;if(!(g()||m()||!c(C)||ge!==c(P))){if(ue.stopPropagation(),ue.target.matches(".base-bar, .slider-bar")){const ye=c(w).getBoundingClientRect(),me=ue.clientX-ye.left;I(me)}V(C,!1),V(A,0),V(k,0),V(P,0),V(O,0),document.removeEventListener("pointermove",D),document.removeEventListener("pointerup",B),document.removeEventListener("pointercancel",B)}},K=(ue,ge=0)=>{const{clientX:ye,screenX:me,pointerId:Ae}=ue;if(g()||m())return;ue.stopPropagation(),V(C,!0);const Ce=c(w).getBoundingClientRect();V(A,ye-Ce.left),V(k,me,!0),V(P,Ae,!0),V(O,ge,!0),document.addEventListener("pointermove",D),document.addEventListener("pointerup",B),document.addEventListener("pointercancel",B)},G=()=>{if(c(y)){const[ue,ge]=u();T[0]=c(E)[c($).indexOf(ue)],T[1]=c(E)[c($).indexOf(ge)],e.onChange?.({values:u()})}else T[0]=c(E)[c($).indexOf(o())],e.onChange?.({value:o()})},W=()=>{if(!c(w))return;V(x,c(w).clientWidth,!0);const ue=(s()-a())/f()+1,ge=c(x)/(ue-1),ye=Array.from({length:ue});V($,ye.map((me,Ae)=>Ae*f()+a(),10),!0),V(E,ye.map((me,Ae)=>Ae*ge),!0),G()};Vt(()=>{const ue=new ResizeObserver(()=>W()),ge=globalThis.matchMedia("(pointer: coarse)");return ue.observe(c(w)),ge.addEventListener("change",W),W(),()=>{ue.disconnect(),ge.removeEventListener("change",W)}}),ze(()=>{o(),u(),G()});var Y=E9();ui("click",ww.body,()=>{V(C,!1)}),mt(Y,()=>({...b,role:"none",class:`sui slider ${e.class??""}`,hidden:p(),[Nr]:{disabled:g(),readonly:m(),invalid:v()}}),void 0,void 0,void 0,"svelte-syp48v");var R=F(Y);R.__pointerdown=ue=>K(ue);var q=z(F(R),2);let J;var Q=z(q,2);Q.__pointerdown=ue=>K(ue,0),Q.__keydown=ue=>L(ue,0);let ee;var re=z(Q,2);{var te=ue=>{var ge=k9();ge.__pointerdown=me=>K(me,1),ge.__keydown=me=>L(me,1);let ye;Z(()=>{Se(ge,"tabindex",g()?-1:0),Se(ge,"aria-label",d()?.[1]),Se(ge,"aria-hidden",p()),Se(ge,"aria-disabled",g()),Se(ge,"aria-readonly",m()),Se(ge,"aria-invalid",v()),Se(ge,"aria-valuemin",a()),Se(ge,"aria-valuemax",s()),Se(ge,"aria-valuenow",u()?.[1]),ye=Co(ge,"",ye,{"inset-inline-start":`${T[1]??""}px`})}),S(ue,ge)};U(re,ue=>{c(y)&&ue(te)})}var de=z(re,2);{var he=ue=>{var ge=X(),ye=M(ge);rt(ye,17,h,yr,(me,Ae,Ce)=>{var _e=S9();let fe;var be=F(_e);Z(()=>{fe=Co(_e,"",fe,{"inset-inline-start":`${c(x)/(h().length-1)*Ce}px`}),ne(be,c(Ae))}),S(me,_e)}),S(ue,ge)};U(de,ue=>{h().length&&ue(he)})}St(R,ue=>V(w,ue),()=>c(w)),Z(()=>{J=Co(q,"",J,{"inset-inline-start":`${(c(y)?T[0]:0)??""}px`,width:`${(c(y)?T[1]-T[0]:T[0])??""}px`}),Se(Q,"tabindex",g()?-1:0),Se(Q,"aria-label",c(y)?d()?.[0]:l()),Se(Q,"aria-hidden",p()),Se(Q,"aria-disabled",g()),Se(Q,"aria-readonly",m()),Se(Q,"aria-invalid",v()),Se(Q,"aria-valuemin",a()),Se(Q,"aria-valuemax",s()),Se(Q,"aria-valuenow",c(y)?u()?.[0]:o()),ee=Co(Q,"",ee,{"inset-inline-start":`${T[0]??""}px`})}),S(t,Y),se(),i()}lc(["pointerdown","keydown"]);var A9=j('<button><span role="none" class="svelte-wuufrp"></span> <!></button>');const C9={hash:"svelte-wuufrp",code:'button.svelte-wuufrp {display:inline-flex;align-items:center;gap:8px;margin:var(--sui-focus-ring-width);border-width:0;border-style:solid;border-color:transparent;padding:0;color:var(--sui-control-foreground-color);background-color:transparent;box-shadow:none;font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);font-weight:var(--sui-font-weight-normal, normal);text-align:start;cursor:pointer;-webkit-user-select:none;user-select:none;}button[aria-invalid=true].svelte-wuufrp span:where(.svelte-wuufrp) {background-color:var(--sui-error-border-color) !important;}button:hover[aria-checked=false].svelte-wuufrp span:where(.svelte-wuufrp) {background-color:var(--sui-hover-background-color);}button:hover[aria-checked=true].svelte-wuufrp span:where(.svelte-wuufrp) {background-color:var(--sui-primary-accent-color-light);}button:active[aria-checked=false].svelte-wuufrp span:where(.svelte-wuufrp) {background-color:var(--sui-active-background-color);}button:active[aria-checked=true].svelte-wuufrp span:where(.svelte-wuufrp) {background-color:var(--sui-primary-accent-color-dark);}button.svelte-wuufrp:focus-visible {outline:0;}button.svelte-wuufrp:focus-visible span:where(.svelte-wuufrp) {outline-color:var(--sui-primary-accent-color-translucent);}button[aria-checked=true].svelte-wuufrp span:where(.svelte-wuufrp) {background-color:var(--sui-primary-accent-color);border-color:transparent;}button[aria-checked=true].svelte-wuufrp span:where(.svelte-wuufrp)::before {--translateX: var(--sui-checkbox-height) * 2 - var(--sui-checkbox-height);border-color:var(--sui-primary-accent-color);background-color:var(--sui-primary-accent-color-inverted);}button[aria-checked=true].svelte-wuufrp span:where(.svelte-wuufrp):dir(ltr)::before {transform:translateX(calc(var(--translateX)));}button[aria-checked=true].svelte-wuufrp span:where(.svelte-wuufrp):dir(rtl)::before {transform:translateX(calc((var(--translateX)) * -1));}span.svelte-wuufrp {position:relative;width:calc(var(--sui-checkbox-height) * 2);height:var(--sui-checkbox-height);padding:0 2px;display:inline-flex;align-items:center;border-width:1.5px;border-style:solid;border-color:var(--sui-checkbox-border-color);border-radius:var(--sui-checkbox-height);background-color:var(--sui-control-background-color);transition:all 200ms;}span.svelte-wuufrp::before {display:inline-block;width:calc(var(--sui-checkbox-height) - 6px);height:calc(var(--sui-checkbox-height) - 6px);border-radius:var(--sui-checkbox-height);background-color:var(--sui-checkbox-border-color);transition:all 200ms;content:"";}'};function w0(t,e){ae(e,!0),ke(t,C9);let n=N(e,"checked",15),r=N(e,"label",3,void 0),i=N(e,"hidden",3,!1),o=N(e,"disabled",3,!1),a=N(e,"readonly",3,!1),s=N(e,"required",3,!1),l=N(e,"invalid",3,!1),u=ot(e,["$$slots","$$events","$$legacy","checked","label","class","hidden","disabled","readonly","required","invalid","children","onChange"]);var d=A9(),f=()=>{!o()&&!a()&&(n(!n()),e.onChange?.(new CustomEvent("Change",{detail:{checked:n()}})))};mt(d,()=>({...u,role:"switch",class:`sui switch ${e.class??""}`,type:"button",hidden:i(),disabled:o()||void 0,"aria-checked":n(),"aria-hidden":i(),"aria-disabled":o(),"aria-readonly":a(),"aria-required":s(),"aria-invalid":l(),onclick:f}),void 0,void 0,void 0,"svelte-wuufrp");var h=z(F(d),2);{var p=m=>{var v=Fe();Z(()=>ne(v,r())),S(m,v)},g=m=>{var v=X(),b=M(v);Ue(b,()=>e.children??He),S(m,v)};U(h,m=>{r()?m(p):m(g,!1)})}S(t,d),se()}var P9=j("<div><!></div>");const O9={hash:"svelte-7s1eny",code:".table-cell.svelte-7s1eny {display:table-cell;}"};function cE(t,e){ke(t,O9);let n=ot(e,["$$slots","$$events","$$legacy","class","children"]);var r=P9();mt(r,()=>({...n,role:"cell",class:`sui table-cell ${e.class??""}`}),void 0,void 0,void 0,"svelte-7s1eny");var i=F(r);Ue(i,()=>e.children??He),S(t,r)}var L9=j("<div><!></div>");const I9={hash:"svelte-17j9jjq",code:".table-row.svelte-17j9jjq {display:table-row;height:var(--sui-primary-row-height);}"};function N9(t,e){ke(t,I9);let n=ot(e,["$$slots","$$events","$$legacy","class","children"]);var r=L9();mt(r,()=>({...n,role:"row",class:`sui table-row ${e.class??""}`}),void 0,void 0,void 0,"svelte-17j9jjq");var i=F(r);Ue(i,()=>e.children??He),S(t,r)}var R9=j("<div><!></div>");const M9={hash:"svelte-11vallv",code:".table.svelte-11vallv {display:table;margin:var(--sui-focus-ring-width);width:calc(100% - var(--sui-focus-ring-width) * 2);}.table.data.svelte-11vallv {border-collapse:collapse;}.table.data.svelte-11vallv :is(.table-col-header, .table-row-header, .table-cell) {border:1px solid var(--sui-secondary-border-color);padding:8px 8px;}"};function D9(t,e){ke(t,M9);let n=ot(e,["$$slots","$$events","$$legacy","class","children"]);var r=R9();mt(r,()=>({...n,role:"table",class:`sui table ${e.class??""}`}),void 0,void 0,void 0,"svelte-11vallv");var i=F(r);Ue(i,()=>e.children??He),S(t,r)}var F9=j('<div><div role="none" class="inner svelte-1lunmuf"><!></div> <div role="none" class="indicator svelte-1lunmuf"></div></div>');const z9={hash:"svelte-1lunmuf",code:".tab-list.svelte-1lunmuf {flex:none;position:relative;display:flex;align-items:center;margin:var(--sui-tab-list-margin, var(--sui-focus-ring-width));border-color:var(--sui-tab-list-border-color, var(--sui-control-border-color));border-radius:var(--sui-tab-list-border-radius, 0);background-color:var(--sui-tab-list-background-color, transparent);}.tab-list[aria-orientation=horizontal].svelte-1lunmuf {gap:var(--sui-horizontal-tab-list-gap, var(--sui-tab-list-gap, 8px));margin-block:var(--sui-horizontal-tab-list-margin-block, 0 32px);margin-inline:var(--sui-horizontal-tab-list-margin-inline, 0);border-block-width:var(--sui-horizontal-tab-list-border-block-width, 0 1px);border-inline-width:var(--sui-horizontal-tab-list-border-inline-width, 0 0);padding:var(--sui-horizontal-tab-list-padding, var(--sui-tab-list-padding, 0 16px));}.tab-list[aria-orientation=horizontal].svelte-1lunmuf button {width:var(--sui-horizontal-tab-width, var(--sui-tab-width, auto));height:var(--sui-horizontal-tab-height, var(--sui-tab-height, 100%));justify-content:var(--sui-horizontal-tab-justify-content, center);}.tab-list[aria-orientation=horizontal].svelte-1lunmuf .indicator:where(.svelte-1lunmuf) {border-block-width:var(--sui-horizontal-tab-list-indicator-border-block-width, 0 2px);border-inline-width:var(--sui-horizontal-tab-list-indicator-border-inline-width, 0 0);}.tab-list[aria-orientation=vertical].svelte-1lunmuf {gap:var(--sui-vertical-tab-list-gap, var(--sui-tab-list-gap, 8px));flex-direction:column;margin-block:var(--sui-vertical-tab-list-margin-block, 0);margin-inline:var(--sui-vertical-tab-list-margin-inline, 0 32px);border-block-width:var(--sui-vertical-tab-list-border-block-width, 0 0);border-inline-width:var(--sui-vertical-tab-list-border-inline-width, 0 1px);padding:var(--sui-vertical-tab-list-padding, var(--sui-tab-list-padding, 8px 0));width:var(--sui-vertical-tab-list-width, auto);}.tab-list[aria-orientation=vertical].svelte-1lunmuf button {justify-content:var(--sui-vertical-tab-justify-content, flex-start);padding-inline-end:32px;width:var(--sui-vertical-tab-width, var(--sui-tab-width, 100%));height:var(--sui-vertical-tab-height, var(--sui-tab-height, auto));}.tab-list[aria-orientation=vertical].svelte-1lunmuf .indicator:where(.svelte-1lunmuf) {border-block-width:var(--sui-vertical-tab-list-indicator-border-block-width, 0 0);border-inline-width:var(--sui-vertical-tab-list-indicator-border-inline-width, 0 2px);}.tab-list.svelte-1lunmuf button {position:relative;z-index:1;border-color:transparent;margin:0 !important;border-radius:var(--sui-tab-border-radius, 0);font-family:var(--sui-tab-font-family, var(--sui-control-font-family, inherit));font-size:var(--sui-tab-font-size, var(--sui-control-font-size, inherit));font-weight:var(--sui-tab-font-weight, var(--sui-control-font-weight, var(--sui-font-weight-normal, normal)));}.inner.svelte-1lunmuf {display:contents;}.indicator.svelte-1lunmuf {position:absolute;z-index:0;inset:auto;border-radius:var(--sui-tab-list-indicator-border-radius, 0);border-color:var(--sui-tab-list-indicator-border-color, var(--sui-primary-accent-color-light));background-color:var(--sui-tab-list-indicator-background-color, transparent);box-shadow:var(--sui-tab-list-indicator-box-shadow, none);pointer-events:none;transition:var(--sui-tab-list-indicator-transition, all 200ms);}"};function j9(t,e){ae(e,!0),ke(t,z9);let n=N(e,"hidden",3,!1),r=N(e,"disabled",3,!1),i=N(e,"orientation",3,"horizontal"),o=N(e,"name",3,void 0),a=ot(e,["$$slots","$$events","$$legacy","class","hidden","disabled","orientation","name","children","onChange"]),s=ie(void 0),l=ie(void 0);const u=()=>{globalThis.requestAnimationFrame(()=>{const v=c(s)?.querySelector('[role="tab"][aria-selected="true"]');if(v){const{offsetTop:b,offsetLeft:y,offsetWidth:w,offsetHeight:x}=v;V(l,Object.entries({top:b,left:y,width:w,height:x}).map(([E,$])=>`${E}: ${$}px`).join("; "),!0)}else V(l,void 0)})};Vt(()=>{const v=new ResizeObserver(()=>{u()});return v.observe(c(s)),()=>{v.disconnect()}});var d=F9(),f=()=>{u()},h=v=>{u(),e.onChange?.(v)};mt(d,()=>({...a,role:"tablist",class:`sui tab-list ${e.class??""}`,hidden:n(),"aria-hidden":n(),"aria-disabled":r(),"aria-orientation":i(),"data-name":o()||void 0,onInitialized:f,onChange:h}),void 0,void 0,void 0,"svelte-1lunmuf");var p=F(d),g=F(p);Ue(g,()=>e.children??He);var m=z(p,2);St(d,v=>V(s,v),()=>c(s)),Vs(d,v=>gd?.(v)),Z(()=>{p.inert=r(),Co(m,c(l))}),S(t,d),se()}var U9=j("<div><!></div>");const B9={hash:"svelte-kbd1w5",code:".tab-panel.svelte-kbd1w5 {flex:auto;transition:all 200ms;}.tab-panel[aria-hidden=true].svelte-kbd1w5, .tab-panel.svelte-kbd1w5:not([aria-hidden]) {display:none;}"};function q9(t,e){ke(t,B9);let n=ot(e,["$$slots","$$events","$$legacy","class","children"]);var r=U9();mt(r,()=>({...n,role:"tabpanel",class:`sui tab-panel ${e.class??""}`}),void 0,void 0,void 0,"svelte-kbd1w5");var i=F(r);Ue(i,()=>e.children??He),S(t,r)}function H9(t,e){let n=N(e,"hidden",3,!1),r=N(e,"disabled",3,!1),i=N(e,"selected",3,!1),o=ot(e,["$$slots","$$events","$$legacy","class","hidden","disabled","selected","children","startIcon","endIcon"]);et(t,Qt(()=>o,{role:"tab",get class(){return`sui tab ${e.class??""}`},get hidden(){return n()},get disabled(){return r()},get"aria-selected"(){return i()},startIcon:u=>{var d=X(),f=M(d);Ue(f,()=>e.startIcon??He),S(u,d)},children:u=>{var d=X(),f=M(d);Ue(f,()=>e.children??He),S(u,d)},endIcon:u=>{var d=X(),f=M(d);Ue(f,()=>e.endIcon??He),S(u,d)},$$slots:{startIcon:!0,default:!0,endIcon:!0}}))}var K9=j('<div role="none" class="sui toast-base svelte-1apiqqf"></div> <div><!></div>',1);const V9={hash:"svelte-1apiqqf",code:".toast-base.svelte-1apiqqf {position:fixed;inset:16px;z-index:99999;display:flex;flex-direction:column;justify-content:flex-end;align-items:flex-end;gap:8px;margin:0;border:0;padding:0;width:auto;height:auto;background-color:transparent;font-family:var(--sui-font-family-default);font-size:var(--sui-font-size-default);font-weight:var(--sui-font-weight-normal, normal);text-align:center;pointer-events:none;-webkit-user-select:none;user-select:none;}body:has(.sui.bottom-navigation:not([inert]:not([hidden]))) .toast-base {bottom:calc(var(--sui-bottom-navigation-height) + 16px);}.toast.svelte-1apiqqf {position:absolute;width:max-content;max-width:80dvw;box-shadow:0 8px 16px var(--sui-popup-shadow-color);opacity:1;transition-duration:250ms;will-change:opacity;}.toast[aria-hidden=true].svelte-1apiqqf {display:block;opacity:0;}.toast.top-left.svelte-1apiqqf {inset-block-start:0;inset-block-end:auto;inset-inline-start:0;inset-inline-end:auto;}.toast.top-center.svelte-1apiqqf {inset-block-start:0;inset-block-end:auto;inset-inline-start:50%;inset-inline-end:auto;}.toast.top-center.svelte-1apiqqf:dir(ltr) {transform:translateX(-50%);}.toast.top-center.svelte-1apiqqf:dir(rtl) {transform:translateX(50%);}.toast.top-right.svelte-1apiqqf {inset-block-start:0;inset-block-end:auto;inset-inline-start:auto;inset-inline-end:0;}.toast.bottom-left.svelte-1apiqqf {inset-block-start:auto;inset-block-end:0;inset-inline-start:0;inset-inline-end:auto;}.toast.bottom-center.svelte-1apiqqf {inset-block-start:auto;inset-block-end:0;inset-inline-start:50%;inset-inline-end:auto;}.toast.bottom-center.svelte-1apiqqf:dir(ltr) {transform:translateX(-50%);}.toast.bottom-center.svelte-1apiqqf:dir(rtl) {transform:translateX(50%);}.toast.bottom-right.svelte-1apiqqf {inset-block-start:auto;inset-block-end:0;inset-inline-start:auto;inset-inline-end:0;}"};function nr(t,e){ae(e,!0),ke(t,V9);let n=N(e,"show",15,!1),r=N(e,"id",3,void 0),i=N(e,"duration",3,5e3),o=N(e,"position",7,"auto"),a=ot(e,["$$slots","$$events","$$legacy","show","id","duration","position","children"]),s=ie(void 0),l=ie(void 0),u=ie(void 0),d=ie(0);Vt(()=>(V(l,document.querySelector(".sui.toast-base.enabled")??void 0,!0),c(l)?c(s)?.remove():(V(l,c(s),!0),c(l)&&(c(l).classList.add("enabled"),(document.querySelector(".sui.app-shell")??document.body).appendChild(c(l)),c(l).showPopover&&(c(l).popover="manual",c(l).showPopover()))),()=>{c(u)?.remove()})),Vt(()=>{if(o()==="auto"){const m=globalThis.matchMedia("(width < 1024px)"),v=()=>{o(m.matches?"bottom-center":`bottom-${document.dir==="rtl"?"left":"right"}`)};v(),m.addEventListener("change",v)}}),ze(()=>{c(l)&&c(u)&&c(l).appendChild(c(u))}),ze(()=>{r(),n(),i(),xe(()=>{globalThis.clearTimeout(c(d))}),n()&&i()&&V(d,globalThis.setTimeout(()=>{n(!1)},i()),!0)});var f=K9(),h=M(f);St(h,m=>V(s,m),()=>c(s));var p=z(h,2);mt(p,()=>({...a,class:`sui toast ${o()??""}`,"aria-hidden":!n()}),void 0,void 0,void 0,"svelte-1apiqqf");var g=F(p);Ue(g,()=>e.children??He),St(p,m=>V(u,m),()=>c(u)),S(t,f),se()}function Be(t,...e){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",t);for(const i of e)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function mL(t,...e){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",t);for(const i of e)r.append("v",i);n.search=r.toString(),console.warn(`Minified Lexical warning #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const Wo=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,G9=Wo&&"documentMode"in document?document.documentMode:null,$o=Wo&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Wl=Wo&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Ig=!(!Wo||!("InputEvent"in window)||G9)&&"getTargetRanges"in new window.InputEvent("input"),th=Wo&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),Nu=Wo&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,W9=Wo&&/Android/.test(navigator.userAgent),vL=Wo&&/^(?=.*Chrome).*/i.test(navigator.userAgent),uE=Wo&&W9&&vL,nh=Wo&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&$o&&!vL;function _L(...t){const e=[];for(const n of t)if(n&&typeof n=="string")for(const[r]of n.matchAll(/\S+/g))e.push(r);return e}const Y9=0,J9=1,X9=2,bL=128,Z9=1,Q9=2,eK=3,tK=4,nK=5,rK=6,ev=th||Nu||nh?" ":"",js=`
|
|
373
|
-
|
|
374
|
-
`,iK=Wl?" ":ev,yL="֑-߿יִ-﷽ﹰ-ﻼ",wL="A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--",oK=new RegExp("^[^"+wL+"]*["+yL+"]"),aK=new RegExp("^[^"+yL+"]*["+wL+"]"),Yl={bold:1,capitalize:1024,code:16,highlight:bL,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},sK={directionless:1,unmergeable:2},dE={center:2,end:6,justify:4,left:1,right:3,start:5},lK={[Q9]:"center",[rK]:"end",[tK]:"justify",[Z9]:"left",[eK]:"right",[nK]:"start"},cK={normal:0,segmented:2,token:1},uK={[Y9]:"normal",[X9]:"segmented",[J9]:"token"},fE="$config";function xL(t,e,n,r,i,o){let a=t.getFirstChild();for(;a!==null;){const s=a.__key;a.__parent===e&&(we(a)&&xL(a,s,n,r,i,o),n.has(s)||o.delete(s),i.push(s)),a=a.getNextSibling()}}let xy=!1,x0=0;function dK(t){x0=t.timeStamp}function v_(t,e,n){const r=t.nodeName==="BR",i=e.__lexicalLineBreak;return i&&(t===i||r&&t.previousSibling===i)||r&&lv(t,n)!==void 0}function fK(t,e,n){const r=Bo(bo(n));let i=null,o=null;r!==null&&r.anchorNode===t&&(i=r.anchorOffset,o=r.focusOffset);const a=t.nodeValue;a!==null&&j0(e,a,i,o,!1)}function hK(t,e,n){if(De(t)){const r=t.anchor.getNode();if(r.is(n)&&t.format!==r.getFormat())return!1}return us(e)&&n.isAttached()}function pK(t,e,n,r){for(let i=t;i&&!vV(i);i=Wh(i)){const o=lv(i,e);if(o!==void 0){const a=qn(o,n);if(a)return Gt(a)||!In(i)?void 0:[i,a]}else if(i===r)return[r,bI(n)]}}function kL(t,e,n){xy=!0;const r=performance.now()-x0>100;try{Ui(t,()=>{const i=Ge()||(function(h){return h.getEditorState().read(()=>{const p=Ge();return p!==null?p.clone():null})})(t),o=new Map,a=t.getRootElement(),s=t._editorState,l=t._blockCursorElement;let u=!1,d="";for(let h=0;h<e.length;h++){const p=e[h],g=p.type,m=p.target,v=pK(m,t,s,a);if(!v)continue;const[b,y]=v;if(g==="characterData")r&&Ye(y)&&us(m)&&hK(i,m,y)&&fK(m,y,t);else if(g==="childList"){u=!0;const w=p.addedNodes;for(let $=0;$<w.length;$++){const A=w[$],k=vI(A),T=A.parentNode;if(T!=null&&A!==l&&k===null&&!v_(A,T,t)){if(Wl){const C=(In(A)?A.innerText:null)||A.nodeValue;C&&(d+=C)}T.removeChild(A)}}const x=p.removedNodes,E=x.length;if(E>0){let $=0;for(let A=0;A<E;A++){const k=x[A];(v_(k,m,t)||l===k)&&(m.appendChild(k),$++)}E!==$&&o.set(b,y)}}}if(o.size>0)for(const[h,p]of o)p.reconcileObservedMutation(h,t);const f=n.takeRecords();if(f.length>0){for(let h=0;h<f.length;h++){const p=f[h],g=p.addedNodes,m=p.target;for(let v=0;v<g.length;v++){const b=g[v],y=b.parentNode;y==null||b.nodeName!=="BR"||v_(b,m,t)||y.removeChild(b)}}n.takeRecords()}i!==null&&(u&&Br(i),Wl&&kI(t)&&i.insertRawText(d))})}finally{xy=!1}}function SL(t){const e=t._observer;e!==null&&kL(t,e.takeRecords(),e)}function EL(t){(function(e){x0===0&&bo(e).addEventListener("textInput",dK,!0)})(t),t._observer=new MutationObserver((e,n)=>{kL(t,e,n)})}let gK=class{key;parse;unparse;isEqual;defaultValue;constructor(e,n){this.key=e,this.parse=n.parse.bind(n),this.unparse=(n.unparse||bK).bind(n),this.isEqual=(n.isEqual||Object.is).bind(n),this.defaultValue=this.parse(void 0)}};function mK(t,e){return new gK(t,e)}function TL(t,e,n="latest"){const r=(n==="latest"?t.getLatest():t).__state;return r?r.getValue(e):e.defaultValue}function __(t,e,n){let r;if(Tr(),typeof n=="function"){const o=t.getLatest(),a=TL(o,e);if(r=n(a),e.isEqual(a,r))return o}else r=n;const i=t.getWritable();return AL(i).updateFromKnown(e,r),i}function vK(t){const e=new Map,n=new Set;for(let r=typeof t=="function"?t:t.replace;r.prototype&&r.prototype.getType!==void 0;r=Object.getPrototypeOf(r)){const{ownNodeConfig:i}=uv(r);if(i&&i.stateConfigs)for(const o of i.stateConfigs){let a;"stateConfig"in o?(a=o.stateConfig,o.flat&&n.add(a.key)):a=o,e.set(a.key,a)}}return{flatKeys:n,sharedConfigMap:e}}let _K=class $L{node;knownState;unknownState;sharedNodeState;size;constructor(e,n,r=void 0,i=new Map,o=void 0){this.node=e,this.sharedNodeState=n,this.unknownState=r,this.knownState=i;const{sharedConfigMap:a}=this.sharedNodeState,s=o!==void 0?o:(function(l,u,d){let f=d.size;if(u)for(const h in u){const p=l.get(h);p&&d.has(p)||f++}return f})(a,r,i);this.size=s}getValue(e){const n=this.knownState.get(e);if(n!==void 0)return n;this.sharedNodeState.sharedConfigMap.set(e.key,e);let r=e.defaultValue;if(this.unknownState&&e.key in this.unknownState){const i=this.unknownState[e.key];i!==void 0&&(r=e.parse(i)),this.updateFromKnown(e,r)}return r}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){const e={...this.unknownState},n={};for(const[r,i]of this.knownState)r.isEqual(i,r.defaultValue)?delete e[r.key]:e[r.key]=r.unparse(i);for(const r of this.sharedNodeState.flatKeys)r in e&&(n[r]=e[r],delete e[r]);return hE(e)&&(n.$=e),n}getWritable(e){if(this.node===e)return this;const{sharedNodeState:n,unknownState:r}=this,i=new Map(this.knownState);return new $L(e,n,(function(o,a,s){let l;if(s)for(const[u,d]of Object.entries(s)){const f=o.get(u);f?a.has(f)||a.set(f,f.parse(d)):(l=l||{},l[u]=d)}return l})(n.sharedConfigMap,i,r),i,this.size)}updateFromKnown(e,n){const r=e.key;this.sharedNodeState.sharedConfigMap.set(r,e);const{knownState:i,unknownState:o}=this;i.has(e)||o&&r in o||(o&&(delete o[r],this.unknownState=hE(o)),this.size++),i.set(e,n)}updateFromUnknown(e,n){const r=this.sharedNodeState.sharedConfigMap.get(e);r?this.updateFromKnown(r,r.parse(n)):(this.unknownState=this.unknownState||{},e in this.unknownState||this.size++,this.unknownState[e]=n)}updateFromJSON(e){const{knownState:n}=this;for(const r of n.keys())n.set(r,r.defaultValue);if(this.size=n.size,this.unknownState=void 0,e)for(const[r,i]of Object.entries(e))this.updateFromUnknown(r,i)}};function AL(t){const e=t.getWritable(),n=e.__state?e.__state.getWritable(e):new _K(e,CL(e));return e.__state=n,n}function CL(t){return t.__state?t.__state.sharedNodeState:gI(Yh(),t.getType()).sharedNodeState}function hE(t){if(t)for(const e in t)return t}function bK(t){return t}function pE(t,e,n){for(const[r,i]of e.knownState){if(t.has(r.key))continue;t.add(r.key);const o=n?n.getValue(r):r.defaultValue;if(o!==i&&!r.isEqual(o,i))return!0}return!1}function gE(t,e,n){const{unknownState:r}=e,i=n?n.unknownState:void 0;if(r){for(const[o,a]of Object.entries(r))if(!t.has(o)&&(t.add(o),a!==(i?i[o]:void 0)))return!0}return!1}function mE(t,e){const n=t.__state;return n&&n.node===t?n.getWritable(e):n}function vE(t,e){const n=t.__mode,r=t.__format,i=t.__style,o=e.__mode,a=e.__format,s=e.__style,l=t.__state,u=e.__state;return(n===null||n===o)&&(r===null||r===a)&&(i===null||i===s)&&(t.__state===null||l===u||(function(d,f){if(d===f)return!0;if(d&&f&&d.size!==f.size)return!1;const h=new Set;return!(d&&pE(h,d,f)||f&&pE(h,f,d)||d&&gE(h,d,f)||f&&gE(h,f,d))})(l,u))}function _E(t,e){const n=t.mergeWithSibling(e),r=Vn()._normalizedNodes;return r.add(t.__key),r.add(e.__key),n}function bE(t){let e,n,r=t;if(r.__text!==""||!r.isSimpleText()||r.isUnmergeable()){for(;(e=r.getPreviousSibling())!==null&&Ye(e)&&e.isSimpleText()&&!e.isUnmergeable();){if(e.__text!==""){if(vE(e,r)){r=_E(e,r);break}break}e.remove()}for(;(n=r.getNextSibling())!==null&&Ye(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(n.__text!==""){if(vE(r,n)){r=_E(r,n);break}break}n.remove()}}else r.remove()}function Ru(t){return yE(t.anchor),yE(t.focus),t}function yE(t){for(;t.type==="element";){const e=t.getNode(),n=t.offset;let r,i;if(n===e.getChildrenSize()?(r=e.getChildAtIndex(n-1),i=!0):(r=e.getChildAtIndex(n),i=!1),Ye(r)){t.set(r.__key,i?r.getTextContentSize():0,"text",!0);break}if(!we(r))break;t.set(r.__key,i?r.getChildrenSize():0,"element",!0)}}let Jl,Xr,rh,tv,ky,Sy,Xl,Mo,Ey,ih,vr="",Qo=null,ea="",Da="",Hc=!1,Ng=!1;function Rg(t,e){const n=Xl.get(t);if(e!==null){const r=Cy(t);r.parentNode===e&&e.removeChild(r)}if(Mo.has(t)||Xr._keyToDOMMap.delete(t),we(n)){const r=Dg(n,Xl);Ty(r,0,r.length-1,null)}n!==void 0&&U0(ih,rh,tv,n,"destroyed")}function Ty(t,e,n,r){let i=e;for(;i<=n;++i){const o=t[i];o!==void 0&&Rg(o,r)}}function al(t,e){t.setProperty("text-align",e)}const yK="40px";function PL(t,e){const n=Jl.theme.indent;if(typeof n=="string"){const i=t.classList.contains(n);e>0&&!i?t.classList.add(n):e<1&&i&&t.classList.remove(n)}const r=getComputedStyle(t).getPropertyValue("--lexical-indent-base-value")||yK;t.style.setProperty("padding-inline-start",e===0?"":`calc(${e} * ${r})`)}function OL(t,e){const n=t.style;e===0?al(n,""):e===1?al(n,"left"):e===2?al(n,"center"):e===3?al(n,"right"):e===4?al(n,"justify"):e===5?al(n,"start"):e===6&&al(n,"end")}function $y(t,e){const n=(function(r){const i=r.__dir;if(i!==null)return i;if(ur(r))return null;const o=r.getParentOrThrow();return ur(o)&&o.__dir===null?"auto":null})(e);n!==null?t.dir=n:t.removeAttribute("dir")}function Mg(t,e){const n=Mo.get(t);n===void 0&&Be(60);const r=n.createDOM(Jl,Xr);if((function(i,o,a){const s=a._keyToDOMMap;(function(l,u,d){const f=`__lexicalKey_${u._key}`;l[f]=d})(o,a,i),s.set(i,o)})(t,r,Xr),Ye(n)?r.setAttribute("data-lexical-text","true"):Gt(n)&&r.setAttribute("data-lexical-decorator","true"),we(n)){const i=n.__indent,o=n.__size;if($y(r,n),i!==0&&PL(r,i),o!==0){const s=o-1;Ay(Dg(n,Mo),n,0,s,n.getDOMSlot(r))}const a=n.__format;a!==0&&OL(r,a),n.isInline()||LL(null,n,r),cv(n)&&(vr+=js,Da+=js)}else{const i=n.getTextContent();if(Gt(n)){const o=n.decorate(Xr,Jl);o!==null&&IL(t,o),r.contentEditable="false"}vr+=i,Da+=i}return e!==null&&e.insertChild(r),U0(ih,rh,tv,n,"created"),r}function Ay(t,e,n,r,i){const o=vr;vr="";let a=n;for(;a<=r;++a){Mg(t[a],i);const s=Mo.get(t[a]);s!==null&&Ye(s)&&(Qo===null&&(Qo=s.getFormat()),ea===""&&(ea=s.getStyle()))}cv(e)&&(vr+=js),i.element.__lexicalTextContent=vr,vr=o+vr}function wE(t,e){if(t){const n=t.__last;if(n){const r=e.get(n);if(r)return Bn(r)?"line-break":Gt(r)&&r.isInline()?"decorator":null}return"empty"}return null}function LL(t,e,n){const r=wE(t,Xl),i=wE(e,Mo);r!==i&&e.getDOMSlot(n).setManagedLineBreak(i)}function wK(t,e,n){var r;Qo=null,ea="",(function(i,o,a){const s=vr,l=i.__size,u=o.__size;vr="";const d=a.element;if(l===1&&u===1){const f=i.__first,h=o.__first;if(f===h)lf(f,d);else{const g=Cy(f),m=Mg(h,null);try{d.replaceChild(m,g)}catch(v){if(typeof v=="object"&&v!=null){const b=`${v.toString()} Parent: ${d.tagName}, new child: {tag: ${m.tagName} key: ${h}}, old child: {tag: ${g.tagName}, key: ${f}}.`;throw new Error(b)}throw v}Rg(f,null)}const p=Mo.get(h);Ye(p)&&(Qo===null&&(Qo=p.getFormat()),ea===""&&(ea=p.getStyle()))}else{const f=Dg(i,Xl),h=Dg(o,Mo);if(f.length!==l&&Be(227),h.length!==u&&Be(228),l===0)u!==0&&Ay(h,o,0,u-1,a);else if(u===0){if(l!==0){const p=a.after==null&&a.before==null&&a.element.__lexicalLineBreak==null;Ty(f,0,l-1,p?null:d),p&&(d.textContent="")}}else(function(p,g,m,v,b,y){const w=v-1,x=b-1;let E,$,A=y.getFirstChild(),k=0,T=0;for(;k<=w&&T<=x;){const O=g[k],I=m[T];if(O===I)A=b_(lf(I,y.element)),k++,T++;else{E===void 0&&(E=new Set(g)),$===void 0&&($=new Set(m));const D=$.has(O),B=E.has(I);if(D)if(B){const K=Zl(Xr,I);K===A?A=b_(lf(I,y.element)):(y.withBefore(A).insertChild(K),lf(I,y.element)),k++,T++}else Mg(I,y.withBefore(A)),T++;else A=b_(Cy(O)),Rg(O,y.element),k++}const L=Mo.get(I);L!==null&&Ye(L)&&(Qo===null&&(Qo=L.getFormat()),ea===""&&(ea=L.getStyle()))}const C=k>w,P=T>x;if(C&&!P){const O=m[x+1],I=O===void 0?null:Xr.getElementByKey(O);Ay(m,p,T,x,y.withBefore(I))}else P&&!C&&Ty(g,k,w,y.element)})(o,f,h,l,u,a)}cv(o)&&(vr+=js),d.__lexicalTextContent=vr,vr=s+vr})(t,e,e.getDOMSlot(n)),r=e,Qo==null||Qo===r.__textFormat||Ng||r.setTextFormat(Qo),(function(i){ea===""||ea===i.__textStyle||Ng||i.setTextStyle(ea)})(e)}function Dg(t,e){const n=[];let r=t.__first;for(;r!==null;){const i=e.get(r);i===void 0&&Be(101),n.push(r),r=i.__next}return n}function lf(t,e){const n=Xl.get(t);let r=Mo.get(t);n!==void 0&&r!==void 0||Be(61);const i=Hc||Sy.has(t)||ky.has(t),o=Zl(Xr,t);if(n===r&&!i){if(we(n)){const a=o.__lexicalTextContent;a!==void 0&&(vr+=a,Da+=a)}else{const a=n.getTextContent();Da+=a,vr+=a}return o}if(n!==r&&i&&U0(ih,rh,tv,r,"updated"),r.updateDOM(n,o,Jl)){const a=Mg(t,null);return e===null&&Be(62),e.replaceChild(a,o),Rg(t,null),a}if(we(n)&&we(r)){const a=r.__indent;(Hc||a!==n.__indent)&&PL(o,a);const s=r.__format;if((Hc||s!==n.__format)&&OL(o,s),i&&(wK(n,r,o),ur(r)||r.isInline()||LL(n,r,o)),cv(r)&&(vr+=js,Da+=js),(Hc||r.__dir!==n.__dir)&&($y(o,r),ur(r)&&!Hc))for(const l of r.getChildren())we(l)&&$y(Zl(Xr,l.getKey()),l)}else{const a=r.getTextContent();if(Gt(r)){const s=r.decorate(Xr,Jl);s!==null&&IL(t,s)}vr+=a,Da+=a}if(!Ng&&ur(r)&&r.__cachedText!==Da){const a=r.getWritable();a.__cachedText=Da,r=a}return o}function IL(t,e){let n=Xr._pendingDecorators;const r=Xr._decorators;if(n===null){if(r[t]===e)return;n=_I(Xr)}n[t]=e}function b_(t){let e=t.nextSibling;return e!==null&&e===Xr._blockCursorElement&&(e=e.nextSibling),e}function xK(t,e,n,r,i,o){vr="",Da="",Hc=r===2,Xr=n,Jl=n._config,rh=n._nodes,tv=Xr._listeners.mutation,ky=i,Sy=o,Xl=t._nodeMap,Mo=e._nodeMap,Ng=e._readOnly,Ey=new Map(n._keyToDOMMap);const a=new Map;return ih=a,lf("root",null),Xr=void 0,rh=void 0,ky=void 0,Sy=void 0,Xl=void 0,Mo=void 0,Jl=void 0,Ey=void 0,ih=void 0,a}function Cy(t){const e=Ey.get(t);return e===void 0&&Be(75,t),e}function gt(t){return{type:t}}const NL=gt("SELECTION_CHANGE_COMMAND"),kK=gt("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),RL=gt("CLICK_COMMAND"),$l=gt("DELETE_CHARACTER_COMMAND"),iu=gt("INSERT_LINE_BREAK_COMMAND"),oh=gt("INSERT_PARAGRAPH_COMMAND"),ou=gt("CONTROLLED_TEXT_INSERTION_COMMAND"),k0=gt("PASTE_COMMAND"),Py=gt("REMOVE_TEXT_COMMAND"),ah=gt("DELETE_WORD_COMMAND"),sh=gt("DELETE_LINE_COMMAND"),Ua=gt("FORMAT_TEXT_COMMAND"),S0=gt("UNDO_COMMAND"),E0=gt("REDO_COMMAND"),ML=gt("KEYDOWN_COMMAND"),DL=gt("KEY_ARROW_RIGHT_COMMAND"),Oy=gt("MOVE_TO_END"),FL=gt("KEY_ARROW_LEFT_COMMAND"),Fg=gt("MOVE_TO_START"),Mu=gt("KEY_ARROW_UP_COMMAND"),zg=gt("KEY_ARROW_DOWN_COMMAND"),jg=gt("KEY_ENTER_COMMAND"),zL=gt("KEY_SPACE_COMMAND"),jL=gt("KEY_BACKSPACE_COMMAND"),UL=gt("KEY_ESCAPE_COMMAND"),BL=gt("KEY_DELETE_COMMAND"),T0=gt("KEY_TAB_COMMAND"),Ly=gt("INSERT_TAB_COMMAND"),Os=gt("INDENT_CONTENT_COMMAND"),_l=gt("OUTDENT_CONTENT_COMMAND"),qL=gt("DROP_COMMAND"),SK=gt("FORMAT_ELEMENT_COMMAND"),HL=gt("DRAGSTART_COMMAND"),KL=gt("DRAGOVER_COMMAND"),EK=gt("DRAGEND_COMMAND"),nv=gt("COPY_COMMAND"),$0=gt("CUT_COMMAND"),Iy=gt("SELECT_ALL_COMMAND"),TK=gt("CLEAR_EDITOR_COMMAND"),$K=gt("CLEAR_HISTORY_COMMAND"),Ep=gt("CAN_REDO_COMMAND"),Tp=gt("CAN_UNDO_COMMAND"),AK=gt("FOCUS_COMMAND"),CK=gt("BLUR_COMMAND"),PK=gt("KEY_MODIFIER_COMMAND"),Pa=Object.freeze({}),Ny=[["keydown",function(t,e){if(Ef=t.timeStamp,VL=t.key,!e.isComposing()&&!tt(e,ML,t)&&t.key!=null){if(y_&&YE(t))return Ui(e,()=>{$p(e,w_)}),y_=!1,void(w_="");if((function(n){return an(n,"ArrowRight",{shiftKey:"any"})})(t))tt(e,DL,t);else if((function(n){return an(n,"ArrowRight",Ia)})(t))tt(e,Oy,t);else if((function(n){return an(n,"ArrowLeft",{shiftKey:"any"})})(t))tt(e,FL,t);else if((function(n){return an(n,"ArrowLeft",Ia)})(t))tt(e,Fg,t);else if((function(n){return an(n,"ArrowUp",{altKey:"any",shiftKey:"any"})})(t))tt(e,Mu,t);else if((function(n){return an(n,"ArrowDown",{altKey:"any",shiftKey:"any"})})(t))tt(e,zg,t);else if((function(n){return an(n,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0})})(t))Tf=!0,tt(e,jg,t);else if((function(n){return n.key===" "})(t))tt(e,zL,t);else if((function(n){return $o&&an(n,"o",{ctrlKey:!0})})(t))t.preventDefault(),Tf=!0,tt(e,iu,!0);else if((function(n){return an(n,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"})})(t))Tf=!1,tt(e,jg,t);else if((function(n){return an(n,"Backspace",{shiftKey:"any"})||$o&&an(n,"h",{ctrlKey:!0})})(t))YE(t)?tt(e,jL,t):(t.preventDefault(),tt(e,$l,!0));else if((function(n){return n.key==="Escape"})(t))tt(e,UL,t);else if((function(n){return an(n,"Delete",{})||$o&&an(n,"d",{ctrlKey:!0})})(t))(function(n){return n.key==="Delete"})(t)?tt(e,BL,t):(t.preventDefault(),tt(e,$l,!1));else if((function(n){return an(n,"Backspace",WE)})(t))t.preventDefault(),tt(e,ah,!0);else if((function(n){return an(n,"Delete",WE)})(t))t.preventDefault(),tt(e,ah,!1);else if((function(n){return $o&&an(n,"Backspace",{metaKey:!0})})(t))t.preventDefault(),tt(e,sh,!0);else if((function(n){return $o&&(an(n,"Delete",{metaKey:!0})||an(n,"k",{ctrlKey:!0}))})(t))t.preventDefault(),tt(e,sh,!1);else if((function(n){return an(n,"b",Ia)})(t))t.preventDefault(),tt(e,Ua,"bold");else if((function(n){return an(n,"u",Ia)})(t))t.preventDefault(),tt(e,Ua,"underline");else if((function(n){return an(n,"i",Ia)})(t))t.preventDefault(),tt(e,Ua,"italic");else if((function(n){return an(n,"Tab",{shiftKey:"any"})})(t))tt(e,T0,t);else if((function(n){return an(n,"z",Ia)})(t))t.preventDefault(),tt(e,S0,void 0);else if((function(n){return $o?an(n,"z",{metaKey:!0,shiftKey:!0}):an(n,"y",{ctrlKey:!0})||an(n,"z",{ctrlKey:!0,shiftKey:!0})})(t))t.preventDefault(),tt(e,E0,void 0);else{const n=e._editorState._selection;n===null||De(n)?JE(t)&&(t.preventDefault(),tt(e,Iy,t)):(function(r){return an(r,"c",Ia)})(t)?(t.preventDefault(),tt(e,nv,t)):(function(r){return an(r,"x",Ia)})(t)?(t.preventDefault(),tt(e,$0,t)):JE(t)&&(t.preventDefault(),tt(e,Iy,t))}(function(n){return n.ctrlKey||n.shiftKey||n.altKey||n.metaKey})(t)&&tt(e,PK,t)}}],["pointerdown",function(t,e){const n=t.target,r=t.pointerType;kd(n)&&r!=="touch"&&r!=="pen"&&t.button===0&&Ui(e,()=>{KE(n)||(Dy=!0)})}],["compositionstart",function(t,e){Ui(e,()=>{const n=Ge();if(De(n)&&!e.isComposing()){const r=n.anchor,i=n.anchor.getNode();Ir(r.key),(t.timeStamp<Ef+30||r.type==="element"||!n.isCollapsed()||i.getFormat()!==n.format||Ye(i)&&i.getStyle()!==n.style)&&tt(e,ou,iK)}})}],["compositionend",function(t,e){Wl?Bd=!0:Nu||!th&&!nh?Ui(e,()=>{$p(e,t.data)}):(y_=!0,w_=t.data)}],["input",function(t,e){t.stopPropagation(),Ui(e,()=>{if(In(t.target)&&KE(t.target))return;const n=Ge(),r=t.data,i=XL(t);if(r!=null&&De(n)&&YL(n,i,r,t.timeStamp,!1)){Bd&&($p(e,r),Bd=!1);const o=n.anchor.getNode(),a=Bo(bo(e));if(a===null)return;const s=n.isBackward(),l=s?n.anchor.offset:n.focus.offset,u=s?n.focus.offset:n.anchor.offset;Ig&&!n.isCollapsed()&&Ye(o)&&a.anchorNode!==null&&o.getTextContent().slice(0,l)+r+o.getTextContent().slice(l+u)===xI(a.anchorNode)||tt(e,ou,r);const d=r.length;Wl&&d>1&&t.inputType==="insertCompositionText"&&!e.isComposing()&&(n.anchor.offset-=d),th||Nu||nh||!e.isComposing()||(Ef=0,Ir(null))}else z0(!1,e,r!==null?r:void 0),Bd&&($p(e,r||void 0),Bd=!1);(function(){Tr();const o=Vn();SL(o)})()},{event:t}),Kc=null}],["click",function(t,e){Ui(e,()=>{const n=Ge(),r=Bo(bo(e)),i=wc();if(r){if(De(n)){const o=n.anchor,a=o.getNode();if(o.type==="element"&&o.offset===0&&n.isCollapsed()&&!ur(a)&&ar().getChildrenSize()===1&&a.getTopLevelElementOrThrow().isEmpty()&&i!==null&&n.is(i))r.removeAllRanges(),n.dirty=!0;else if(t.detail===3&&!n.isCollapsed()&&a!==n.focus.getNode()){const s=pi(a,l=>we(l)&&!l.isInline());we(s)&&s.select(0)}}else if(t.pointerType==="touch"||t.pointerType==="pen"){const o=r.anchorNode;(In(o)||us(o))&&Br(C0(i,r,e,t))}}tt(e,RL,t)})}],["cut",Pa],["copy",Pa],["dragstart",Pa],["dragover",Pa],["dragend",Pa],["paste",Pa],["focus",Pa],["blur",Pa],["drop",Pa]];Ig&&Ny.push(["beforeinput",(t,e)=>(function(n,r){const i=n.inputType,o=XL(n);i==="deleteCompositionText"||Wl&&kI(r)||i!=="insertCompositionText"&&Ui(r,()=>{const a=Ge();if(i==="deleteContentBackward"){if(a===null){const p=wc();if(!De(p))return;Br(p.clone())}if(De(a)){const p=a.anchor.key===a.focus.key;if(s=n.timeStamp,VL==="MediaLast"&&s<Ef+30&&r.isComposing()&&p){if(Ir(null),Ef=0,setTimeout(()=>{Ui(r,()=>{Ir(null)})},30),De(a)){const g=a.anchor.getNode();g.markDirty(),Ye(g)||Be(142),JL(a,g)}}else{Ir(null),n.preventDefault();const g=a.anchor.getNode(),m=g.getTextContent(),v=g.canInsertTextAfter(),b=a.anchor.offset===0&&a.focus.offset===m.length;let y=uE&&p&&!b&&v;if(y&&a.isCollapsed()&&(y=!Gt(qy(a.anchor,!0))),!y){tt(r,$l,!0);const w=Ge();uE&&De(w)&&w.isCollapsed()&&(fl=w,setTimeout(()=>fl=null))}}return}}var s;if(!De(a))return;const l=n.data;Kc!==null&&z0(!1,r,Kc),a.dirty&&Kc===null||!a.isCollapsed()||ur(a.anchor.getNode())||o===null||a.applyDOMRange(o),Kc=null;const u=a.anchor,d=a.focus,f=u.getNode(),h=d.getNode();if(i!=="insertText"&&i!=="insertTranspose")switch(n.preventDefault(),i){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":tt(r,ou,n);break;case"insertFromComposition":Ir(null),tt(r,ou,n);break;case"insertLineBreak":Ir(null),tt(r,iu,!1);break;case"insertParagraph":Ir(null),Tf&&!Nu?(Tf=!1,tt(r,iu,!1)):tt(r,oh,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":tt(r,k0,n);break;case"deleteByComposition":(function(p,g){return p!==g||we(p)||we(g)||!Al(p)||!Al(g)})(f,h)&&tt(r,Py,n);break;case"deleteByDrag":case"deleteByCut":tt(r,Py,n);break;case"deleteContent":tt(r,$l,!1);break;case"deleteWordBackward":tt(r,ah,!0);break;case"deleteWordForward":tt(r,ah,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":tt(r,sh,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":tt(r,sh,!1);break;case"formatStrikeThrough":tt(r,Ua,"strikethrough");break;case"formatBold":tt(r,Ua,"bold");break;case"formatItalic":tt(r,Ua,"italic");break;case"formatUnderline":tt(r,Ua,"underline");break;case"historyUndo":tt(r,S0,void 0);break;case"historyRedo":tt(r,E0,void 0)}else{if(l===`
|
|
348
|
+
`,V5=async(t,e)=>{if(!t.length)return{};const{isSelfHosted:n=!1}=vo,r=n?20:100,i=[...t],o=[];for(;;){const a=i.splice(0,r),s=await Xs(e,{paths:a});if(o.push(...s.project.repository.blobs.nodes),!i.length)break}return Object.fromEntries(t.map((a,s)=>[a,o[s]]))},G5=async({fetchingFiles:t,blobs:e,sizes:n={},commits:r={}})=>{const i=t.map(({path:o,sha:a})=>{const s=r[o],l={sha:a,size:Number(n[o]?.size??0),text:e[o]?.rawTextBlob??void 0,meta:{}};if(s){const{author:u,authorName:d,authorEmail:f,committedDate:h}=s,{id:p,username:g}=u??{},m=p?.match(/\d+/);l.meta={commitAuthor:{name:d,email:f,id:m?Number(m[0]):void 0,login:g},committedDate:new Date(h)}}return[o,l]});return Object.fromEntries(i)},W5=async t=>{fa.set(0);const e=window.setInterval(()=>{fa.update((i=0)=>i+1)},t.length/10),n=t.filter(({type:i})=>i!=="asset").map(({path:i})=>i),r=await V5(n,K5);return window.clearInterval(e),fa.set(void 0),G5({fetchingFiles:t,blobs:r})},Y5=async()=>{await D5(),await d0({repository:vo,fetchDefaultBranchName:z5,fetchLastCommit:U5,fetchFileList:H5,fetchFileContents:W5})},J5=async t=>{const{owner:e,repo:n,branch:r=""}=vo,{path:i}=t;return dr(`/projects/${encodeURIComponent(`${e}/${n}`)}/repository/files/${encodeURIComponent(i)}/raw?lfs=true&ref=${encodeURIComponent(r)}`,{responseType:"blob"})},X5="https://status.gitlab.com/",Z5="https://status-api.hostedstatus.com/1.0/status/5b36dc6502d06804c08349f7",Q5=async()=>{try{const{result:{status_overall:{status_code:t}}}=await Rh(Z5);if(t===100)return"none";if([200,300,400].includes(t))return"minor";if([500,600].includes(t))return"major"}catch{}return"unknown"},e8=()=>{const{backend:t}=oe(Pt)??{};if(t?.name!==kf)return;const{repo:e,branch:n,base_url:r=O5,auth_endpoint:i=L5,app_id:o="",api_root:a=XS,graphql_api_root:s=a.replace(/\/api\/.+$/,"/api/graphql")}=t,{owner:l,repo:u}=e.match(/(?<owner>.+)\/(?<repo>[^/]+)$/)?.groups??{},d=`${l}/${u}`,f=`${on(r)}/${on(i)}`,h=c0(a,d);return Object.assign(vo,{service:kf,label:qO,owner:l,repo:u,branch:n,repoURL:h,newPatURL:N5(h),databaseName:`${kf}:${d}`,isSelfHosted:a!==XS},HO(h,n)),Object.assign(gc,{clientId:o,authScope:"api",authURL:f,tokenURL:f.replace("/authorize","/token"),authScheme:"Bearer",restBaseURL:on(a),graphqlBaseURL:on(s)}),Object.assign(Mh,{fullPath:d,branch:n}),oe(ht).devModeEnabled&&console.info("repositoryInfo",vo),vo},t8={isGit:!0,name:kf,label:qO,repository:vo,statusDashboardURL:X5,checkStatus:Q5,init:e8,signIn:R5,signOut:M5,fetchFiles:Y5,fetchBlob:J5,commitChanges:B5},Dh={github:P5,gitlab:t8,gitea:r5,local:gq,"test-repo":kq},n8=Object.keys(Dh).filter(t=>t!=="local"),r8=Object.fromEntries(Object.entries(Dh).filter(([,t])=>t.isGit)),mc=it(),Cn=sn([mc],([t],e,n)=>{n(r=>{const i=t?Dh[t]:void 0;return i&&i!==r&&i.init(),i})}),Pg=it(!0);wr.extend(Tx);wr.extend($x);wr.extend(Ax);const i8=/{{(?:year|month|day|hour|minute|second)}}/,ls=t=>$P(Object.values(t.locales)[0].path).map(({collectionName:e})=>ki(e)).filter(e=>!!e),o8=({dateFieldName:t,fields:e,content:n})=>{const r=t?e.find(({widget:s,name:l})=>s==="datetime"&&l===t):e.find(({widget:s})=>s==="datetime"),i=r?n[r.name]:void 0;if(!r||!i)return;const{format:o,picker_utc:a=!1}=r;return jl({date:(a?wr.utc:wr)(i,o).toDate(),timeZone:a?"UTC":void 0})},KO=(t,e,n,r)=>{const{show_preview_links:i=!0,_baseURL:o}=oe(Pt)??{},{slug:a,path:s,content:l}=t.locales[e]??{},{preview_path:u,preview_path_date_field:d,fields:f=[]}=r??n;if(!i||!o||!s||!l||!u)return;const h=Ea(n,t),g=(h?Mi(n):void 0)?.fields??f;let m;if(!(i8.test(u)&&(m=o8({dateFieldName:d,fields:g,content:l}),!m)))try{const v=la(u,{type:"preview_path",collection:n,content:l,locale:e,currentSlug:a,entryFilePath:s,dateTimeParts:m,isIndexFile:h});return`${o.replace(/\/$/,"")}/${v.replace(/^\//,"")}`}catch{return}},a8=(t,e)=>`${oe(Cn)?.repository?.blobBaseURL}/${t.locales[e]?.path}?plain=1`,Gm=t=>!("divider"in t)&&typeof t.file=="string"&&Array.isArray(t.fields),Wm=t=>t.filter(e=>Gm(e)),pd=(t,e)=>{const n=typeof t=="string"?ki(t):t;if(!(!n||!("_fileMap"in n)))return n._fileMap[e]},Fh=t=>t.label||t.name,Zs=(t,e)=>"_fileMap"in t?Object.values(t._fileMap).filter(({_file:n,_i18n:r})=>n.fullPath===e.locales[r.defaultLocale]?.path):[],f0=(t,e)=>oe(to).find(n=>ls(n).some(r=>r.name===t&&Zs(r,n).some(i=>i.name===e))),ZS=(t,e)=>{if(t&&e){const{collections:n,singletons:r}=oe(Pt);if(t==="_singletons")return Array.isArray(r)?Wm(r).findIndex(o=>o.name===e):-1;const i=Qs({collections:n}).find(({name:o})=>o===t);if(i&&"files"in i)return i.files.findIndex(({name:o})=>o===e)}return-1},xs={SINGLE_FILE:"single_file",MULTIPLE_FILES:"multiple_files",MULTIPLE_FOLDERS:"multiple_folders",MULTIPLE_FOLDERS_I18N_ROOT:"multiple_folders_i18n_root"},Sf="_default",py={key:"translationKey",value:"{{slug}}"},Go={i18nEnabled:!1,saveAllLocales:!0,allLocales:[Sf],initialLocales:[Sf],defaultLocale:Sf,structure:xs.SINGLE_FILE,structureMap:{i18nSingleFile:!1,i18nMultiFile:!1,i18nMultiFolder:!1,i18nRootMultiFolder:!1},canonicalSlug:{...py},omitDefaultLocaleFromFileName:!1},s8=(t,e)=>{const n=oe(Pt);if(!$t(n.i18n))return;const r=structuredClone(n.i18n);if(t.i18n||h0(t)){if($t(t.i18n)&&Object.assign(r,t.i18n),e)if(e.i18n)$t(e.i18n)&&Object.assign(r,e.i18n);else return}else return;return r},l8=(t,e)=>e?e.file.includes("{{locale}}")?xs.MULTIPLE_FILES:xs.SINGLE_FILE:t,c8=(t,e)=>({i18nSingleFile:t&&e===xs.SINGLE_FILE,i18nMultiFile:t&&e===xs.MULTIPLE_FILES,i18nMultiFolder:t&&e===xs.MULTIPLE_FOLDERS,i18nRootMultiFolder:t&&e===xs.MULTIPLE_FOLDERS_I18N_ROOT}),u8=(t,e,n)=>t?n&&e.includes(n)?n:e[0]:Sf,d8=(t,e,n)=>t==="all"?e:t==="default"?[n]:e.filter(r=>r===n||(Array.isArray(t)?t.includes(r):!0)),zh=(t,e)=>{const n=s8(t,e),{structure:r=xs.SINGLE_FILE,locales:i=[],default_locale:o,initial_locales:a,save_all_locales:s=!0,canonical_slug:l={key:void 0,value:void 0},omit_default_locale_from_filename:u=!1}=n??{};n?.save_all_locales!==void 0&&Km("save_all_locales");const{key:d=py.key,value:f=py.value}=l,h=i.length>0,p=h?i:[Sf],g=u8(h,p,o),m=l8(r,e),v=c8(h,m),b=h?s===!0&&a===void 0:!0,y=d8(a,p,g),w=u&&(e?/\.{{locale}}\.[a-zA-Z0-9]+$/.test(e.file):v.i18nMultiFile);return{i18nEnabled:h,saveAllLocales:b,allLocales:p,defaultLocale:g,initialLocales:y,structure:m,structureMap:v,canonicalSlug:{key:d,value:f},omitDefaultLocaleFromFileName:w}},tr=it(),Ud=new Map,Xf=t=>typeof t.folder=="string"&&!Array.isArray(t.files),Og=t=>t.folder===void 0&&Array.isArray(t.files),h0=t=>Og(t)&&t.name==="_singletons",f8=(t,{visible:e=void 0,type:n=void 0}={})=>"divider"in t||e&&t.hide?!1:n==="entry"?Xf(t):n==="file"?Og(t):n==="singleton"?h0(t):Xf(t)||Og(t),Qs=({collections:t=oe(Pt)?.collections??[],visible:e,type:n}={})=>t.filter(r=>f8(r,{visible:e,type:n})),h8=()=>Qs({visible:!0})[0],p8=t=>{if(!("folder"in t))return[];const{fields:e,thumbnail:n=!0}=t;return n===!1?[]:typeof n=="string"?[n]:Array.isArray(n)?n:e?.length?e.filter(({widget:r="string"})=>["image","file"].includes(r)).map(({name:r})=>r):[]},g8=(t,e)=>({...t,_i18n:e,_type:"entry",_file:yO({rawCollection:t,_i18n:e}),_thumbnailFieldNames:p8(t)}),VO=(t,e,n)=>({...t,_i18n:e,_type:h0(t)?"singleton":"file",_fileMap:Object.fromEntries(n.filter(Gm).map(r=>{const i=zh(t,r),o=yO({rawCollection:t,file:r,_i18n:i});return[r.name,{...r,_file:o,_i18n:i}]}))}),GO=()=>{const t=oe(Pt)?.singletons;if(!Array.isArray(t))return;const e=Wm(t).map(i=>({...i,file:on(i.file)}));if(!e.length)return;const n={name:"_singletons",files:e},r=zh(n);return VO(n,r,e)},ki=t=>{const e=Ud.get(t);if(e)return e;if(t==="_singletons"){const s=GO();return Ud.set(t,s),s}const n=Qs().find(s=>s.name===t);if(!n){Ud.set(t,void 0);return}const r=Xf(n)?n:void 0,i=Og(n)?n:void 0;if(!r&&!i){Ud.set(t,void 0);return}r?r.folder=on(r.folder):i?.files.forEach(s=>{s.file&&(s.file=on(s.file))});const o=zh(n),a=r?g8(r,o):i?VO(i,o,i.files):void 0;return Ud.set(t,a),a},Za=(t,{useSingular:e=!1}={})=>{const{_type:n,name:r,label:i,label_singular:o}=t;return n==="singleton"?oe(ce)("files"):e&&o?o:i||r},QS=t=>t?t==="_singletons"?9999999:oe(Pt)?.collections?.findIndex(({name:e})=>e===t)??-1:-1,Qp=[],eE=t=>t.includes("{{media_folder}}")||t.includes("{{public_folder}}"),tE=(t,{globalMediaFolder:e,globalPublicFolder:n})=>t.trim().replace("{{media_folder}}",`/${e}`).replace("{{public_folder}}",`/${n}`).replace("//","/"),m8=({collectionName:t,fileName:e,typedKeyPath:n,isIndexFile:r=!1,mediaFolder:i,publicFolder:o,baseFolder:a,globalFolders:s})=>{if(eE(i)){if(!s)return;i=tE(i,s)}if(o===void 0)o=i;else if(eE(o)){if(!s)return;o=tE(o,s)}const l=!i.startsWith("/");return{collectionName:t,fileName:e,typedKeyPath:n,isIndexFile:r,internalPath:on(l?a??"":i),internalSubPath:l?on(i):void 0,publicPath:o===""||/^[.@]/.test(o)?o:`/${on(o)}`,entryRelative:l,hasTemplateTags:/{{.+?}}/.test(i)}},p0=t=>{if(t.mediaFolder===void 0)return;const e=m8(t);if(!e)return;const{globalMediaFolder:n,globalPublicFolder:r}=t.globalFolders??{};!e.entryRelative&&e.internalPath===n&&e.publicPath===r||Qp.push(e)},nE=({collectionName:t,files:e,globalFolders:n})=>{Wm(e).forEach(r=>{const{name:i,file:o,media_folder:a,public_folder:s}=r;p0({collectionName:t,fileName:i,mediaFolder:a,publicFolder:s,baseFolder:pn(o).dirname,globalFolders:n})})},v8=({fieldMediaFolders:t,validCollections:e,globalFolders:n})=>{t.forEach(({fieldConfig:r,context:i})=>{const o=i.collection;(o.name==="_singletons"||e.some(s=>s.name===o.name))&&p0({collectionName:o.name,fileName:i.collectionFile?.name,mediaFolder:r.media_folder,publicFolder:r.public_folder,baseFolder:"folder"in o?o.folder:void 0,typedKeyPath:i.typedKeyPath,isIndexFile:i.isIndexFile,globalFolders:n})})},_8=(t,e=[])=>{Qp.length=0;const{media_folder:n,public_folder:r,collections:i,singletons:o}=t,a=!!n,s=a?on(n).replace(/^\.$/,""):"",l=a?r?`/${on(r)}`.replace(/^\/@/,"@"):`/${s}`:"",u={collectionName:void 0,internalPath:void 0,internalSubPath:void 0,publicPath:void 0,entryRelative:!1,hasTemplateTags:!1},d=a?{...u,internalPath:s,publicPath:l}:void 0,f=a?{globalMediaFolder:s,globalPublicFolder:l}:void 0,h=Qs({collections:i});h.forEach(g=>{const{name:m,files:v,folder:b,path:y,media_folder:w,public_folder:x}=g;p0({collectionName:m,mediaFolder:w===void 0&&y!==void 0?"":w,publicFolder:x,baseFolder:b,globalFolders:f}),v?.length&&nE({collectionName:m,files:v,globalFolders:f})}),o?.length&&nE({collectionName:"_singletons",files:o,globalFolders:f}),v8({fieldMediaFolders:e,validCollections:h,globalFolders:f}),Qp.sort((g,m)=>eo(g.internalPath??"",m.internalPath??""));const p=[];return d&&p.push(d),p.push(...Qp),p.length&&p.unshift(u),p},b8=({collection:t,file:e})=>{const n=on(e.file);if(!n.includes("{{locale}}"))return{_default:n};const r=zh(t,e);return Object.fromEntries(r.allLocales.map(i=>[i,Rx({_i18n:r,locale:i,path:n})]))},WO=(t,e)=>{if(Gm(e))return{collectionName:t.name,fileName:e.name,filePathMap:b8({collection:t,file:e})}},YO=(t,e)=>eo(Object.values(t.filePathMap??{})[0],Object.values(e.filePathMap??{})[0]),y8=({collections:t})=>Qs({collections:t,type:"entry",visible:!0}).map(e=>{const{name:n,folder:r}=e,i=on(r),{allLocales:o,structureMap:{i18nRootMultiFolder:a}}=zh(e);return{collectionName:n,folderPath:i,folderPathMap:Object.fromEntries(o.map(s=>[s,a?`${s}/${i}`:i]))}}).sort((e,n)=>eo(e.folderPath??"",n.folderPath??"")),w8=({collections:t})=>Qs({collections:t,type:"file",visible:!0}).map(e=>(e.files??[]).map(n=>WO(e,n))).flat(1).filter(e=>!!e).sort(YO),x8=({singletons:t})=>{const e=Array.isArray(t)?Wm(t):[];if(!e.length)return[];const n={name:"_singletons",files:e};return e.map(r=>WO(n,r)).filter(r=>!!r).sort(YO)},k8=t=>[...y8(t),...w8(t),...x8(t)],S8=["text/yaml","application/yaml","application/toml","application/json"],E8=async({href:t,type:e="application/yaml"})=>{let n;if(!S8.includes(e))throw new Error(oe(ce)("config.error.parse_failed"),{cause:new Error(oe(ce)("config.error.parse_failed_unsupported_type"))});try{n=await fetch(t)}catch(a){throw new Error(oe(ce)("config.error.fetch_failed"),{cause:a})}const{ok:r,status:i}=n;if(!r)throw new Error(oe(ce)("config.error.fetch_failed"),{cause:new Error(oe(ce)("config.error.fetch_failed_not_ok",{values:{status:i}}))});let o;try{if(e==="application/json")o=await n.json();else{const a=await n.text();e==="application/toml"?o=r0(a):o=i0(a,{merge:!0,maxAliasCount:-1})}}catch(a){throw new Error(oe(ce)("config.error.parse_failed"),{cause:a})}if(!$t(o))throw new Error(oe(ce)("config.error.parse_failed"),{cause:new Error(oe(ce)("config.error.parse_failed_invalid_object"))});return o},T8=t=>{if(t.endsWith("/"))return`${t}config.yml`;const e=t.split("/");return e.pop()?.includes(".")?`${e.join("/")}/config.yml`:`${t}/config.yml`},rE=async()=>{const t=[...document.querySelectorAll('link[rel="cms-config-url"]')].map(({href:n,type:r})=>({href:n,type:r}));t.length||t.push({href:T8(window.location.pathname)});const e=await Promise.all(t.map(n=>E8(n)));return e.length===1?e[0]:ix.all(e)},Jr=({type:t="error",strKey:e,values:n={},context:r={},collectors:i})=>{const{collection:o,collectionFile:a,typedKeyPath:s}=r,{errors:l,warnings:u}=i,d=oe(ce),f=[];o&&f.push(d("config.error_locator.collection",{values:{collection:o.label_singular??o.label??o.name}})),a&&f.push(d("config.error_locator.file",{values:{file:a.label??a.name}})),s&&f.push(d("config.error_locator.field",{values:{field:s}}));const h=t==="error"?l:u,p=oe(Bt),g=f.length?`${Hl(p).format(f)}: `:"",m=d(`config.${t}.${e}`,{values:n});h.add(`${g}${m}`)},el=({UNSUPPORTED_OPTIONS:t,config:e,context:n,collectors:r})=>{t.forEach(({type:i="error",prop:o,newProp:a,value:s,strKey:l="unsupported_deprecated_option"})=>{o in e&&(s===void 0||e[o]===s)&&Jr({type:i,strKey:l,values:{prop:o,newProp:a},context:n,collectors:r})})},$8=/^[^\s.*:<>]+$/,A8=t=>$8.test(t),jh=({name:t,index:e,nameCounts:n,strKeyBase:r,context:i,collectors:o})=>{if(!t||typeof t!="string"){const a=String(e+1);return Jr({strKey:`missing_${r}`,context:i,values:{count:a},collectors:o}),!1}return A8(t)?n[t]===1?(Jr({strKey:`duplicate_${r}`,context:i,values:{name:t},collectors:o}),!1):(n[t]=(n[t]??0)+1,!0):(Jr({strKey:`invalid_${r}`,context:i,values:{name:t},collectors:o}),!1)},C8=[{type:"warning",prop:"use_graphql",strKey:"unsupported_ignored_option"},{type:"warning",prop:"open_authoring",strKey:"open_authoring_unsupported"}],P8=(t,e)=>{const{backend:n}=t,{errors:r}=e;if(!$t(n)){r.add(oe(ce)("config.error.missing_backend"));return}const{name:i}=n;if(!i){r.add(oe(ce)("config.error.missing_backend_name"));return}if(!n8.includes(i)){r.add(oe(ce)("config.error.unsupported_backend",{values:{name:i}}));return}if(Object.keys(r8).includes(i)){const{repo:o,automatic_deployments:a,auth_type:s,app_id:l}=n;o===void 0&&r.add(oe(ce)("config.error.missing_repository")),(typeof o!="string"||!/(.+)\/([^/]+)$/.test(o))&&r.add(oe(ce)("config.error.invalid_repository")),s==="implicit"&&r.add(oe(ce)("config.error.oauth_implicit_flow")),(i==="gitea"||s==="pkce")&&!l&&r.add(oe(ce)("config.error.oauth_no_app_id")),a!==void 0&&Km("automatic_deployments"),el({UNSUPPORTED_OPTIONS:C8,config:n,context:{},collectors:e})}},JO=(t,e)=>{if(!t||!e)return!1;const n=t==="yml"?"yaml":t,r=e==="yml"?"yaml":e;if(n==="md"||n==="markdown"||n==="mdx")return!(r==="frontmatter"||r.endsWith("-frontmatter"));if(r.endsWith("-frontmatter")){const o=r.replace("-frontmatter","");return n!==o}if(r==="frontmatter")return!0;const i=["yaml","toml","json"];return i.includes(r)?i.includes(n)&&n!==r:!1},O8=[{prop:"dateFormat",newProp:"date_format"},{prop:"timeFormat",newProp:"time_format"},{prop:"pickerUtc",newProp:"picker_utc"}],L8=t=>{el({...t,UNSUPPORTED_OPTIONS:O8})},I8=[{prop:"allow_multiple",newProp:"multiple",strKey:"allow_multiple"}],iE=t=>{const{config:e,context:n,collectors:r}=t,{media_folder:i}=e;i!==void 0&&r.mediaFields.add({fieldConfig:e,context:n}),el({...t,UNSUPPORTED_OPTIONS:I8})},N8=t=>{const{config:e,context:n,collectors:r}=t,{field:i}=e,{fields:o}=e,{types:a}=e,{typedKeyPath:s}=n,l={nameCounts:{},strKeyBase:"variable_type",collectors:r};if(i&&o||i&&a||o&&a){Jr({strKey:"invalid_list_field",context:n,collectors:r});return}i&&XO({config:i,context:{...n,typedKeyPath:`${s}.*`},collectors:r}),o&&Vl(o,{...n,typedKeyPath:`${s}.*`},r),a?.forEach(({name:u,fields:d},f)=>{const h={...n,typedKeyPath:`${s}.*<${u}>`};jh({...l,name:u,index:f,context:h})&&d&&Vl(d,h,r)})},R8=[{prop:"editorComponents",newProp:"editor_components"}],M8=t=>{el({...t,UNSUPPORTED_OPTIONS:R8})},D8=[{prop:"valueType",newProp:"value_type"}],F8=t=>{el({...t,UNSUPPORTED_OPTIONS:D8})},z8=t=>{const{config:e,context:n,collectors:r}=t,{fields:i}=e,{types:o}=e,{typedKeyPath:a}=n,s={nameCounts:{},strKeyBase:"variable_type",collectors:r};if(i&&o){Jr({strKey:"invalid_object_field",context:n,collectors:r});return}if(!i&&!o){Jr({strKey:"object_field_missing_fields",context:n,collectors:r});return}i&&Vl(i,n,r),o?.forEach(({name:l,fields:u},d)=>{const f={...n,typedKeyPath:`${a}<${l}>`};jh({...s,name:l,index:d,context:f})&&u&&Vl(u,f,r)})},j8=[{prop:"displayFields",newProp:"display_fields"},{prop:"searchFields",newProp:"search_fields"},{prop:"valueField",newProp:"value_field"},{type:"warning",prop:"options_length",strKey:"unsupported_ignored_option"}],U8=t=>{const{config:e,context:n,collectors:r}=t,i=e,{collection:o,file:a,value_field:s}=i,{cmsConfig:l}=n,u=o==="_singletons"?{files:l?.singletons}:l?.collections?.find(f=>f.name===o);let d;if(u){const f="files"in u&&Array.isArray(u.files);a?(f&&(d=u.files.find(h=>"file"in h&&h.name===a)),d||Jr({strKey:"relation_field_invalid_collection_file",context:n,collectors:r,values:{file:a}})):f&&Jr({strKey:"relation_field_missing_file_name",context:n,collectors:r,values:{collection:o}})}else Jr({strKey:"relation_field_invalid_collection",context:n,collectors:r,values:{collection:o}});el({...t,UNSUPPORTED_OPTIONS:j8}),r.relationFields.add({fieldConfig:i,context:n})},B8={datetime:L8,file:iE,image:iE,list:N8,markdown:M8,number:F8,object:z8,relation:U8},XO=t=>{const{config:e,context:n}=t,{name:r,widget:i="string"}=e,{typedKeyPath:o}=n,a={...t,context:{...n,typedKeyPath:o?`${o}.${r}`:r}};B8[i]?.(a),i==="date"&&Jr({...a,strKey:"date_widget"})},Vl=(t,e,n)=>{const r={nameCounts:{},strKeyBase:"field_name",context:e,collectors:n};t?.forEach((i,o)=>{const{name:a}=i;jh({...r,name:a,index:o})&&XO({config:i,context:e,collectors:n})})},q8=(t,e)=>{const{collection:n,collectionFile:r}=t,{file:i,format:o=n.format,fields:a}=r,{extension:s}=pn(i);JO(s,o)&&Jr({strKey:"file_format_mismatch",context:t,values:{extension:s,format:o},collectors:e}),Vl(a,t,e)},ZO=(t,e)=>{const{cmsConfig:n,collection:r}=t,{files:i}=r,o={nameCounts:{},strKeyBase:"collection_file_name",collectors:e};i.forEach((a,s)=>{if("divider"in a)return;const{name:l}=a,u={cmsConfig:n,collection:r,collectionFile:a};jh({...o,name:l,index:s,context:u})&&q8(u,e)})},H8=[{type:"warning",prop:"nested",strKey:"nested_collections_unsupported"},{prop:"sortableFields",newProp:"sortable_fields"}],K8=(t,e)=>{const{cmsConfig:n,collection:r}=t,{extension:i,format:o,fields:a,index_file:s,slug:l}=r;JO(i,o)&&Jr({strKey:"file_format_mismatch",values:{extension:i,format:o},context:t,collectors:e}),el({UNSUPPORTED_OPTIONS:H8,config:r,context:t,collectors:e}),Vl(a,t,e),s&&Vl(s===!0?a:s.fields??a,{cmsConfig:n,collection:r,isIndexFile:!0},e),l?.includes("/")&&Jr({strKey:"invalid_slug_slash",values:{slug:l},context:t,collectors:e})},V8=({cmsConfig:t,collection:e},n)=>{const r="divider"in e,i="files"in e,o="folder"in e;if(!r&&!i&&!o){Jr({strKey:"invalid_collection_no_options",context:{collection:e},collectors:n});return}if(r&&i||r&&o||i&&o){Jr({strKey:"invalid_collection_multiple_options",context:{collection:e},collectors:n});return}i?ZO({cmsConfig:t,collection:e},n):o&&K8({cmsConfig:t,collection:e},n)},G8=(t,e)=>{const{collections:n,singletons:r}=t,{errors:i}=e,o=oe(ce);if(!Array.isArray(n)&&!Array.isArray(r)){i.add(o("config.error.no_collection"));return}const a={nameCounts:{},strKeyBase:"collection_name",collectors:e};if(n?.forEach((s,l)=>{if("divider"in s)return;const{name:u}=s,d={cmsConfig:t,collection:s};jh({...a,name:u,index:l,context:d})&&V8(d,e)}),Array.isArray(r)){const s={name:"_singletons",label:o("singletons"),label_singular:o("singleton"),files:r};ZO({cmsConfig:t,collection:s},e)}},oE=["cloudinary","uploadcare"],QO=({libraryName:t="default",fieldConfig:e}={})=>{const n=oe(Pt);if(e?.media_libraries?.[t])return e.media_libraries[t];if(e?.media_library){const r=n?.media_library?.name??"default",i=e.media_library,o=i.name;if(r===t&&(o===t||o===void 0))return i}return n?.media_libraries?.[t]?n.media_libraries[t]:n?.media_library?.name===t?n.media_library:{}},W8=(t,e)=>{const{media_folder:n,public_folder:r,media_library:i,media_libraries:o}=t,{errors:a}=e;n===void 0?!oE.includes(i?.name??"")&&!Object.keys(o||{}).some(s=>oE.includes(s))&&a.add(oe(ce)("config.error.missing_media_folder")):typeof n!="string"&&a.add(oe(ce)("config.error.invalid_media_folder")),r!==void 0&&(typeof r!="string"?a.add(oe(ce)("config.error.invalid_public_folder")):(/^\.{1,2}\//.test(r)&&a.add(oe(ce)("config.error.public_folder_relative_path")),/^https?:/.test(r)&&a.add(oe(ce)("config.error.public_folder_absolute_url"))))},Y8=[{type:"warning",prop:"publish_mode",value:"editorial_workflow",strKey:"editorial_workflow_unsupported"},{type:"warning",prop:"local_backend",strKey:"unsupported_ignored_option"},{type:"warning",prop:"locale",strKey:"unsupported_ignored_option"},{type:"warning",prop:"search",strKey:"unsupported_ignored_option"}],J8=(t,e)=>{P8(t,e),W8(t,e),G8(t,e),el({UNSUPPORTED_OPTIONS:Y8,config:t,context:{},collectors:e})},X8={DEV:!1},{DEV:Z8}=X8,Q8=void 0,eL={},Pt=it(),g0=it(),gy=it([]),Zo={errors:new Set,warnings:new Set,mediaFields:new Set,relationFields:new Set},e6=async t=>{Pt.set(void 0),gy.set([]),Object.assign(Zo,{errors:new Set,warnings:new Set,mediaFields:new Set,relationFields:new Set});try{if(!window.isSecureContext)throw new Error(oe(ce)("config.error.no_secure_context"));let e;if(t){if(!$t(t))throw new Error(oe(ce)("config.error.parse_failed"));e=t,e.load_config_file!==!1&&(e=ix(await rE(),e))}else e=await rE();if(Object.assign(eL,e),J8(e,Zo),Zo.errors.size)throw Zo.errors.forEach(r=>{console.error(r)}),new Error("Errors found in configuration");Zo.warnings.size&&Zo.warnings.forEach(r=>{console.warn(r)});const n=structuredClone(e);n._siteURL=n.site_url?.trim()||(Z8?Q8:window.location.origin),n._baseURL=Sh(n._siteURL)?new URL(n._siteURL).origin:"",n.collections?.forEach(r=>{"folder"in r&&(r.folder==="."||r.folder==="/")&&(r.folder="")}),Pt.set(n),g0.set(await zl(kx(n)))}catch(e){gy.set(Zo.errors.size?[...Zo.errors]:[e.name==="Error"?e.message:oe(ce)("config.error.unexpected")]),console.error(e,e.cause)}};Pt.subscribe(t=>{if(oe(ht).devModeEnabled&&(console.info("cmsConfig",t),console.info("collectors",Zo)),!t)return;const e=k8(t),n=_8(t,[...Zo.mediaFields]);Sx.set(e),Ws.set(n),oe(ht).devModeEnabled&&(console.info("allEntryFolders",e),console.info("allAssetFolders",n))});const tL=(t,{fallback:e=!0}={})=>{const{slug:{encoding:n="unicode",clean_accents:r=!1,sanitize_replacement:i="-",trim:o=!0}={}}=oe(Pt)??{};let a=t;if(r&&(a=g3(a.normalize("NFD"))),n==="ascii"?a=a.replaceAll(/[^\w-~]/g," "):a=a.replaceAll(/[\p{Z}\p{C}!"#$&'()*+,/:;<=>?@[\]^`{|}]/gu," "),a=a.toLocaleLowerCase().trim().replaceAll(/\s+/g,i),i){const s=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),l=new RegExp(`${s}+`,"g");a=a.replace(l,i),o&&(a=a.replace(new RegExp(`^${s}+|${s}+$`,"g"),""))}return!a&&e?Vi("short"):a},t6=["year","month","day","hour","minute","second"],n6=/{{(.+?)}}(?!'\))/g,r6={uuid:()=>Vi(),uuid_short:()=>Vi("short"),uuid_shorter:()=>Vi("shorter")},i6=(t,e)=>t6.includes(t)?e[t]:void 0,o6=t=>{const e=r6[t];return e?e():void 0},a6=(t,e,n,r)=>{if(!(t!=="slug"||!e))return n==="preview_path"&&r?"":e},s6=(t,e,n)=>{if(!e)return"";switch(t){case"dirname":{const r=e.replace(n??"",""),i=r.lastIndexOf("/");return i>0?r.substring(0,i):""}case"filename":return e.split("/").pop().split(".").shift();case"extension":return e.split("/").pop().split(".").pop();default:return}},l6=(t,e,n)=>t.startsWith("fields.")?e[t.replace(/^fields\./,"")]:t==="slug"?Ou(e,{identifierField:n}):e[t],nL=(t,e)=>{const{type:n,content:r,currentSlug:i,entryFilePath:o,locale:a,dateTimeParts:s=jl({timeZone:"UTC"}),identifierField:l,basePath:u,isIndexFile:d=!1}=e,f=i6(t,s);if(f!==void 0)return f;const h=a6(t,i,n??"",d);if(h!==void 0)return h;const p=o6(t);if(p!==void 0)return p;if(n==="preview_path"&&t==="locale")return a;if(n==="preview_path"||n==="media_folder"){const g=s6(t,o,u);if(g!==void 0)return g}return l6(t,r,l)},c6=(t,e)=>{let n=!1;return t.forEach((r,i)=>{const{defaultValue:o}=r.match(KP)?.groups??{};if(o!==void 0){n=!0;const{innerTag:a}=o.match(/^{{(?<innerTag>.+?)}}$/)?.groups??{};a!==void 0&&(t[i]=`default('${nL(a,e)??""}')`)}}),{transformations:t,hasDefaultTransformation:n}},u6=(t,{replaceSubContext:e,getFieldArgs:n})=>{const[r,...i]=t.split(/\s*\|\s*/);let o=nL(r,e);const{transformations:a,hasDefaultTransformation:s}=c6(i,e);return o===void 0&&!s?Vi("short"):(a.length&&(o=Dx({fieldConfig:gn({...n,keyPath:r}),value:o,transformations:a})),e.type?String(o):tL(String(o)))},d6=(t,e)=>Sa(t).map(n=>e?n.locales[e]?.slug:n.slug).filter(Boolean),la=(t,e)=>{const{collection:n,content:r,currentSlug:i,locale:o,isIndexFile:a=!1}=e,{_type:s,name:l}=n,{identifier_field:u="title",slug_length:d=void 0,_file:{basePath:f}={}}=s==="entry"?n:{},h={replaceSubContext:{...e,identifierField:u,basePath:f},getFieldArgs:{collectionName:l,keyPath:"",valueMap:r,isIndexFile:a}};let p=t.replace(n6,(g,m)=>u6(m,h)).trim();return typeof d=="number"&&(p=_2(p,d,{ellipsis:""}).replace(/-$/,"")),i?p:MP(p,d6(l,o))},Uh=({fieldConfig:t}={})=>{const e=QO({fieldConfig:t}),{max_file_size:n,multiple:r,slugify_filename:i,transformations:o}=typeof e=="boolean"?{}:e?.config??{};return{config:{max_file_size:typeof n=="number"&&Number.isInteger(n)?n:1/0,multiple:typeof r=="boolean"?r:!1,slugify_filename:typeof i=="boolean"?i:!1,transformations:$t(o)?o:void 0}}},rL=async(t,e)=>{const[n,r]=t.type.split("/");if(n==="image"&&r!=="svg+xml"){let i;if(r in e?i=e[r]:"raster_image"in e&&FP.includes(r)&&(i=e.raster_image),i){const{format:o,quality:a,width:s,height:l}=i,u=o&&zP.includes(o)?o:"webp",d=await Ix(t,{format:u,quality:a&&Number.isSafeInteger(a)?a:85,width:s&&Number.isSafeInteger(s)?s:void 0,height:l&&Number.isSafeInteger(l)?l:void 0}),f=d.type===`image/${u}`?ey.test(t.name)?t.name.replace(ey,u):t.name.concat(u):t.name;return new File([d],f,{type:d.type})}}return n==="image"&&r==="svg+xml"&&e.svg?.optimize?new File([await UU(t)],t.name,{type:t.type}):t},Wn=it([]),Zf=it([]),ba=it(),zs=it(),Oo=it({folder:void 0,files:[]}),my=it(),eg=it(),f6=sn([Oo],([t],e,n)=>{e({processing:!1,undersizedFiles:[],oversizedFiles:[],transformedFileMap:new WeakMap});const r=t.files,i=new WeakMap,{max_file_size:o,transformations:a}=Uh().config;let s=[];(async()=>(r.length&&a?(n(l=>({...l,processing:!0})),s=await Promise.all(r.map(async l=>{const u=await rL(l,a);return u!==l&&i.set(u,l),u}))):s=[...r],n(()=>({processing:!1,undersizedFiles:s.filter(({size:l})=>l<=o),oversizedFiles:s.filter(({size:l})=>l>o),transformedFileMap:i}))))()}),aE=({path:t,entry:e,collection:n,file:r})=>{const{locales:i}=e,{media_folder:o,_i18n:{defaultLocale:a}}=r??n,s=a in i?a:Object.keys(i)[0],{path:l,content:u}=i[s];if(!l||!u)return;const{entryFolder:d}=l.match(/(?<entryFolder>.+?)(?:\/[^/]+)?$/)?.groups??{},f=Zb(Au([d,o,t]));return oe(Wn).find(h=>h.path===f)},h6=({path:t,entry:e})=>e?ls(e).map(r=>{const i=Zs(r,e),o={path:t,entry:e,collection:r};return i.length?i.map(a=>aE({...o,file:a})):aE({...o})}).flat(1).filter(Boolean)[0]??oe(Wn).find(r=>r.path===t):void 0,p6=({path:t,entry:e,collectionName:n,fileName:r})=>{const i=oe(Wn).find(u=>u.path===on(t));if(i)return i;const{dirname:o="",basename:a}=pn(t);let s;return[da({collectionName:n,fileName:r}),da({collectionName:n}),oe(ed),oe(Ws).findLast(u=>o.match(`^${(u.publicPath??"").replace(/{{.+?}}/g,".+?")}\\b`))].filter(u=>!!u).find(u=>{const{publicPath:d,collectionName:f}=u;let{internalPath:h}=u;if(h!==void 0&&/{{.+?}}/.test(h)){const m=f?ki(f):e?ls(e)?.[0]:void 0;if(!(e&&m))return!1;const{content:v,path:b}=e.locales[m._i18n.defaultLocale];h=la(h,{type:"media_folder",collection:m,content:Pi(v),currentSlug:e.slug,entryFilePath:b,isIndexFile:Ea(m,e)})}d&&h&&o&&o.startsWith(`${d}/`)&&(h=o.replace(d,h));const p=Au([h,a]),g=oe(Wn).find(m=>m.path===p);return g&&(s=g),!!g}),s},m0=({value:t,entry:e,collectionName:n,fileName:r})=>{const i=SU(t.split("#")[0]);return/^[/@]/.test(i)?p6({path:i,entry:e,collectionName:n,fileName:r}):h6({path:i,entry:e})},g6=t=>oe(Wn).filter(e=>fn(e.folder,t)),v0=t=>oe(Wn).filter(e=>pn(e.path).dirname===t);Po.subscribe(()=>{ba.set(void 0)});const iL=async(t,e)=>{const{name:n,_i18n:{defaultLocale:r},_thumbnailFieldNames:i}=t,{locales:o}=e,{content:a}=o[r]??Object.values(o)[0]??{};if(!a)return;const s=i.map(l=>{if(l.includes("*")){const u=new RegExp(`^${Xt(l).replace("\\*",".+")}$`);return Object.keys(a).filter(d=>u.test(d))}return l}).flat(1);for(const l of s){const u=a[l]?await ql({value:a[l],entry:e,collectionName:n,thumbnail:!0}):void 0;if(u)return u}},_0=({entry:t,collectionName:e,fileName:n,relative:r=!1})=>{const{locales:i}=t,o=ki(e);if(!o)return[];const a=Ea(o,t),s=Object.values(i).map(({content:l})=>Object.entries(l??{}).map(([u,d])=>{if(typeof d=="string"&&(!r||!/^[/@]/.test(d))&&["image","file"].includes(gn({collectionName:e,keyPath:u,isIndexFile:a})?.widget??"string")){const f=m0({value:d,entry:t,collectionName:e,fileName:n});if(f&&Em(f.path).some(h=>h.collectionName===e&&h.fileName===n&&(r?h.entryRelative:!0)))return f}})).flat(1).filter((l,u,d)=>!!l&&d.indexOf(l)===u);if(r&&da({collectionName:e,fileName:n})?.entryRelative){const l=pn(Object.values(t.locales)[0].path).dirname;oe(Wn).forEach(u=>{pn(u.path).dirname===l&&!s.find(({path:d})=>d===u.path)&&s.push(u)})}return s},sE=["preSave","postSave","prePublish","postPublish","preUnpublish","postUnpublish"],m6=["preSave","prePublish"],oL=new Set,aL=async({type:t,draft:e,savingEntry:n})=>{const{login:r="",name:i=""}=oe(Un),{collection:o,collectionFile:a,isNew:s,collectionName:l,fileName:u}=e,{_i18n:{defaultLocale:d}}=a??o,{slug:f,locales:h}=n,p=Object.keys(h).filter(b=>b!==d),{content:g,path:m}=h[d],v=_0({entry:n,collectionName:l,fileName:u});for(const b of oL){if(b.name!==t)continue;const y=await b.handler({author:{login:r,name:i},entry:GF({data:zo(g),i18n:Object.fromEntries(p.map(w=>[w,{data:zo(h[w].content)}])),slug:f,path:m,newRecord:s,collection:l,mediaFiles:v.map(({sha:w,file:x,size:E,blobURL:$,...A})=>({id:w,name:A.name,path:A.path,file:x,size:E,url:$,displayURL:$})),meta:{path:m},isModification:null,label:null,partial:!1,author:"",raw:"",status:"",updatedOn:""})});if(m6.includes(t)&&wm(y)){const w=y.toJS();$t(w.data)&&$t(w.i18n)?(h[d].content=Pi(w.data),p.forEach(x=>{$t(w.i18n[x]?.data)&&(h[x].content=Pi(w.i18n[x].data))})):$t(w)&&(h[d].content=Pi(w))}}},vc=it(!1),vy=it(!1),sf=it({show:!1,multiple:!1}),_y=it({id:void 0,show:!1,status:"success",message:void 0,count:1,sourceLanguage:void 0}),ol=it(null),Jo=it(null),Iu=it(),by=new Set,v6="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(v6);const _6={ok:"OK",cancel:"Cancel",close:"Close",clear:"Clear",insert:"Insert",update:"Update",remove:"Remove",collapse:"Collapse",expand:"Expand",dismiss:"Dismiss",calendar:{year:"Year",previous_decade:"Previous Decade",next_decade:"Next Decade",month:"Month",previous_month:"Previous Month",next_month:"Next Month",today:"Today"},split_button:{x_options:"{name} Options",more_options:"More Options"},combobox:{select_an_option:"Select an option…",filter_options:"Filter Options",no_matching_options:"No matching options found"},number_input:{decrease:"Decrease",increase:"Increase"},password_input:{show_password:"Show Password",hide_password:"Hide Password"},text_editor:{text_editor:"Text Editor",code_editor:"Code Editor",text_style_options:"Text Style Options",show_text_style_options:"Show Text Style Options",paragraph:"Paragraph",heading_1:"Heading 1",heading_2:"Heading 2",heading_3:"Heading 3",heading_4:"Heading 4",heading_5:"Heading 5",heading_6:"Heading 6",bulleted_list:"Bulleted List",numbered_list:"Numbered List",blockquote:"Block Quote",code_block:"Code Block",bold:"Bold",italic:"Italic",strikethrough:"Strikethrough",code:"Code",link:"Link",insert_link:"Insert Link",update_link:"Update Link",text:"Text",url:"URL",edit_in_markdown:"Edit in Markdown",converter_error:"There was an error while enabling rich text mode. Please use the plain text editor instead.",language:"Language",plain_text:"Plain Text"}},b6=Object.freeze(Object.defineProperty({__proto__:null,strings:_6},Symbol.toStringTag,{value:"Module"})),y6={ok:"OK",cancel:"キャンセル",close:"閉じる",clear:"クリア",insert:"挿入",update:"更新",remove:"削除",collapse:"折り畳む",expand:"広げる",dismiss:"閉じる",calendar:{year:"年",previous_decade:"前の 10 年",next_decade:"次の 10 年",month:"月",previous_month:"前月",next_month:"翌月",today:"今日"},split_button:{x_options:"{name} オプション",more_options:"その他のオプション"},combobox:{select_an_option:"オプションを選択…",filter_options:"オプションを絞り込み",no_matching_options:"一致するオプションは見つかりませんでした"},number_input:{decrease:"減らす",increase:"増やす"},password_input:{show_password:"パスワードを表示",hide_password:"パスワードを隠す"},text_editor:{text_editor:"テキストエディター",code_editor:"コードエディター",text_style_options:"テキストスタイルオプション",show_text_style_options:"テキストスタイルオプションを表示",paragraph:"段落",heading_1:"見出し 1",heading_2:"見出し 2",heading_3:"見出し 3",heading_4:"見出し 4",heading_5:"見出し 5",heading_6:"見出し 6",bulleted_list:"番号なしリスト",numbered_list:"番号付きリスト",blockquote:"ブロック引用",code_block:"コードブロック",bold:"太字",italic:"斜体",strikethrough:"取り消し線",code:"コード",link:"リンク",insert_link:"リンクを挿入",update_link:"リンクを更新",text:"テキスト",url:"URL",edit_in_markdown:"マークダウンで編集",converter_error:"リッチテキストモードを有効化中に問題が発生しました。代わりにプレーンテキストエディターを使用してください。",language:"言語",plain_text:"プレーンテキスト"}},w6=Object.freeze(Object.defineProperty({__proto__:null,strings:y6},Symbol.toStringTag,{value:"Module"})),Gl=it(!1),sL=({fallbackLocale:t="en",initialLocale:e="en"}={})=>{Object.entries(Object.assign({"../locales/en.js":b6,"../locales/ja.js":w6})).forEach(([r,{strings:i}])=>{const[,o]=r.match(/([a-zA-Z-]+)\.js/);ax(o,{_sui:i})}),kz({fallbackLocale:t,initialLocale:e})},x6=["ar","fa","he","ur"],k6=t=>t&&x6.includes(t.split("-")[0])?"rtl":"ltr";Bt.subscribe(t=>{document.documentElement.dir=k6(t)}),new MutationObserver(()=>{Gl.set(document.dir==="rtl")}).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});var S6=j("<span> </span>");const E6={hash:"svelte-1ae1ths",code:".icon.small-arrow.svelte-1ae1ths {overflow:hidden;width:12px;text-indent:-6px;}"};function Qe(t,e){ke(t,E6);let n=ot(e,["$$slots","$$events","$$legacy","class","name"]);var r=S6();mt(r,()=>({...n,class:`sui icon material-symbols-outlined ${e.class??""}`,"aria-hidden":!("aria-label"in n)}),void 0,void 0,void 0,"svelte-1ae1ths");var i=F(r);Z(()=>ne(i,e.name)),S(t,r)}var T6=j("<div><!> <!></div>");const $6={hash:"svelte-l4f2xc",code:".alert.svelte-l4f2xc {display:flex;align-items:center;gap:var(--gap, 8px);padding:var(--padding, 8px);border-width:var(--border-width, var(--sui-control-medium-border-width));border-style:var(--border-style, solid);border-radius:var(--border-radius, var(--sui-control-medium-border-radius));font-size:var(--font-size, var(--sui-font-size-default));}.alert.error.svelte-l4f2xc {border-color:var(--sui-error-border-color);color:var(--sui-error-foreground-color);background-color:var(--sui-error-background-color);}.alert.warning.svelte-l4f2xc {border-color:var(--sui-warning-border-color);color:var(--sui-warning-foreground-color);background-color:var(--sui-warning-background-color);}.alert.info.svelte-l4f2xc {border-color:var(--sui-info-border-color);color:var(--sui-info-foreground-color);background-color:var(--sui-info-background-color);}.alert.success.svelte-l4f2xc {border-color:var(--sui-success-border-color);color:var(--sui-success-foreground-color);background-color:var(--sui-success-background-color);}"};function Hn(t,e){ke(t,$6);let n=ot(e,["$$slots","$$events","$$legacy","status","children","icon"]);var r=T6();mt(r,()=>({...n,role:"alert",class:`sui alert ${e.status??""}`}),void 0,void 0,void 0,"svelte-l4f2xc");var i=F(r);{var o=l=>{var u=X(),d=M(u);Ue(d,()=>e.icon),S(l,u)},a=l=>{{let u=_(()=>e.status==="success"?"check_circle":e.status);Qe(l,{get name(){return c(u)}})}};U(i,l=>{e.icon?l(o):l(a,!1)})}var s=z(i,2);Ue(s,()=>e.children??He),S(t,r)}const lL=()=>navigator.userAgentData?.platform==="macOS"||navigator.platform.startsWith("Mac"),yy=(t,e)=>{const{ctrlKey:n,metaKey:r,altKey:i,shiftKey:o,code:a}=t,s=a.replace(/^(?:Digit|Key)(.)$/,"$1");return e.split(/\s+/).some(l=>{const u=l.split("+");return u.includes("Ctrl")&&!n||u.includes("Meta")&&!r||u.includes("Alt")&&!i||u.includes("Shift")&&!o||!u.includes("Ctrl")&&n||!u.includes("Meta")&&r||!u.includes("Alt")&&i||!u.includes("Shift")&&o?!1:u.filter(d=>!["Ctrl","Meta","Alt","Shift"].includes(d)).every(d=>d.toUpperCase()===s.toUpperCase())})},cL=(t,e="")=>{let n;const r=a=>{const{disabled:s,offsetParent:l}=t,{top:u,left:d}=t.getBoundingClientRect();!yy(a,n)||!l||(s&&t.style.setProperty("pointer-events","auto"),document.elementsFromPoint(d+4,u+4).includes(t)&&(a.preventDefault(),s||(t.focus(),t.click())),s&&t.style.removeProperty("pointer-events"))},i=()=>{globalThis.removeEventListener("keydown",r,{capture:!0}),t.removeAttribute("aria-keyshortcuts")},o=()=>{n=e?e.replace(/\bAccel\b/g,lL()?"Meta":"Ctrl"):void 0,n&&(globalThis.addEventListener("keydown",r,{capture:!0}),t.setAttribute("aria-keyshortcuts",n))};return o(),{update(a){i(),o()},destroy(){i()}}};var A6=j('<span role="none" class="sui truncated-text svelte-1abn7ej"><!></span>');const C6={hash:"svelte-1abn7ej",code:".truncated-text.svelte-1abn7ej {display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;white-space:normal;overflow-wrap:anywhere;}"};function Ur(t,e){ke(t,C6);let n=N(e,"lines",3,1),r=N(e,"children",3,void 0);var i=A6(),o=F(i);Ue(o,()=>r()??He),Z(()=>Co(i,`-webkit-line-clamp: ${n()??""}; line-clamp: ${n()??""};`)),S(t,i)}const b0=(t="e",e=7)=>[t,Vi(e)].join("-"),wy=t=>{if(t)return new Promise(e=>{const n=new IntersectionObserver(([r])=>{r.isIntersecting&&(n.disconnect(),e(void 0))});globalThis.requestAnimationFrame(()=>{n.observe(t)})})};let P6=class{open=it(!1);style=it({inset:void 0,zIndex:void 0,minWidth:void 0,maxWidth:void 0,height:void 0});observer=new IntersectionObserver(e=>{e.forEach(({intersectionRect:n,rootBounds:r})=>{if(!n||!r)return;const i=this.popupElement.querySelector(".content"),{scrollHeight:o,scrollWidth:a}=i,s=n.top-8,l=r.height-n.bottom-8;let{position:u}=this,d;document.dir==="rtl"&&(u.endsWith("-left")?u=u.replace("-left","-right"):u.endsWith("-right")&&(u=u.replace("-right","-left")),u.startsWith("left-")?u=u.replace("left-","right-"):u.startsWith("right-")&&(u=u.replace("right-","left-"))),u.startsWith("bottom-")&&o>l&&(s>l?(u=u.replace("bottom-","top-"),d=s):d=l),u.endsWith("-left")&&n.left+a>r.width-8&&(u=u.replace("-left","-right")),u.endsWith("-right")&&n.right-a<8&&(u=u.replace("-right","-left"));const f=u.startsWith("bottom-")?`${Math.round(n.bottom)}px`:u.endsWith("-top")?`${Math.round(n.top)}px`:"auto",h=u.startsWith("left-")?`${Math.round(r.width-n.left)}px`:u.endsWith("-right")?`${Math.round(r.width-n.right)}px`:"auto",p=u.startsWith("top-")?`${Math.round(r.height-n.top)}px`:u.endsWith("-bottom")?`${Math.round(r.height-n.bottom)}px`:"auto",g=u.startsWith("right-")?`${Math.round(n.right)}px`:u.endsWith("-left")?`${Math.round(n.left)}px`:"auto",m={inset:[f,h,p,g].join(" "),zIndex:1e3,minWidth:`${Math.round(n.width)}px`,maxWidth:u.endsWith("-left")?`${Math.round(r.width-n.left-8)}px`:`${Math.round(n.right-8)}px`,height:d?`${Math.round(d)}px`:"auto"};JSON.stringify(m)!==JSON.stringify(oe(this.style))&&this.style.set(m)})});constructor(e,n,r,i){this.anchorElement=e,this.popupElement=n,this.position=r,this.positionBaseElement=i??e,this.id=b0("popup"),this.anchorElement.setAttribute("aria-controls",this.id),this.popupElement.setAttribute("id",this.id),Nd(e,"click",()=>{!this.isDisabled&&!this.isReadOnly&&this.open.set(!oe(this.open))}),Nd(e,"keydown",o=>{const{key:a,ctrlKey:s,metaKey:l,shiftKey:u,altKey:d}=o,f=u||d||s||l;!this.isDisabled&&!this.isReadOnly&&["Enter"," "].includes(a)&&!f&&(o.preventDefault(),o.stopPropagation(),this.open.set(!oe(this.open)))}),Nd(e,"transitionstart",()=>{this.anchorElement.closest(".hiding, .hidden, [hidden]")&&this.hideImmediately()}),new IntersectionObserver(([o])=>{!o.isIntersecting&&oe(this.open)&&this.hideImmediately()}).observe(this.anchorElement),Nd(this.popupElement,"click",o=>{o.stopPropagation();const a=o.target;oe(this.open)&&(a===this.popupElement||a.matches('[role^="menuitem"], [role="option"]'))&&this.open.set(!1)}),Nd(this.popupElement,"keydown",o=>{const{key:a,ctrlKey:s,metaKey:l,shiftKey:u,altKey:d}=o;a==="Escape"&&!(u||d||s||l)&&(o.preventDefault(),o.stopPropagation(),this.open.set(!1))}),this.open.subscribe(o=>{o?this.checkPosition():this.anchorElement.getAttribute("aria-expanded")==="true"&&(this.anchorElement.focus(),this.anchorElement.removeAttribute("aria-controls")),this.anchorElement.setAttribute("aria-expanded",String(o))}),new ResizeObserver(()=>{this.checkPosition()}).observe(this.positionBaseElement)}get isDisabled(){return this.anchorElement.matches('[aria-disabled="true"]')}get isReadOnly(){return this.anchorElement.matches('[aria-readonly="true"]')}checkPosition(){this.observer.unobserve(this.positionBaseElement),this.observer.observe(this.positionBaseElement)}async hideImmediately(){this.popupElement.hidden=!0,this.open.set(!1),await Rt(50),this.popupElement.hidden=!1}};const O6=(...t)=>new P6(...t);function L6(t,e){var n=X(),r=M(n);Ue(r,()=>e.children??He),S(t,n)}var I6=j("<dialog><!> <!></dialog>");const N6={hash:"svelte-1o3r9uh",code:"dialog.svelte-1o3r9uh {position:fixed;inset:0;z-index:9999999;display:flex;justify-content:center;align-items:center;overflow:hidden;outline:0;margin:0;border:0;padding:0;width:100dvw;max-width:100dvw;height:100dvh;max-height:100dvh;color:var(--sui-primary-foreground-color);background:transparent;-webkit-user-select:none;user-select:none;touch-action:none;pointer-events:all;cursor:default;}dialog.svelte-1o3r9uh::backdrop {background:transparent;}dialog.backdrop.svelte-1o3r9uh {background-color:var(--sui-popup-backdrop-color);}dialog.open.svelte-1o3r9uh {transition-duration:50ms;opacity:1;}dialog.svelte-1o3r9uh:not(.open) {transition-duration:400ms;opacity:0;}dialog[hidden].svelte-1o3r9uh {transition-duration:1ms !important;}dialog.svelte-1o3r9uh:not(.active) {pointer-events:none !important;}dialog.svelte-1o3r9uh:not(.active) * {transition-duration:0ms !important;pointer-events:none !important;}"};function uL(t,e){ae(e,!0),ke(t,N6);const n=x=>{var E=I6(),$=({target:P})=>{i()&&s()&&P?.matches("dialog")&&(i(i().returnValue="cancel",!0),r(!1))},A=P=>{P.preventDefault(),i()&&l()&&(i(i().returnValue="cancel",!0),r(!1))};mt(E,()=>({...d,inert:!c(p),role:o(),class:`sui modal ${e.class??""}`,onclick:$,oncancel:A,[Nr]:{backdrop:a(),open:c(p),active:c(g)}}),void 0,void 0,void 0,"svelte-1o3r9uh");var k=F(E);Ue(k,()=>e.extraContent??He);var T=z(k,2);{var C=P=>{var O=X(),I=M(O);Ue(I,()=>e.children??He),S(P,O)};U(T,P=>{(c(m)||u())&&P(C)})}St(E,P=>i(P),()=>i()),S(x,E)};let r=N(e,"open",15,!1),i=N(e,"dialog",15),o=N(e,"role",3,"dialog"),a=N(e,"showBackdrop",3,!1),s=N(e,"lightDismiss",3,!1),l=N(e,"escapeDismiss",3,!0),u=N(e,"keepContent",3,!1),d=ot(e,["$$slots","$$events","$$legacy","open","dialog","class","role","showBackdrop","lightDismiss","escapeDismiss","keepContent","children","extraContent","onOpening","onOpen","onClosing","onOk","onCancel","onClose"]);const f=()=>{i()?.focus()},h=x=>{i()&&(i(i().returnValue=x,!0),r(!1))};let p=ie(!1),g=ie(!1),m=ie(!1);const v=async()=>new Promise(x=>{const E=$=>{$.target===i()&&(i().removeEventListener("transitionend",E),x())};i()?.addEventListener("transitionend",E)}),b=async()=>{!i()||i()?.open||(e.onOpening?.(new CustomEvent("Opening")),V(m,!0),i().showModal(),e.onOpen?.(new CustomEvent("Open")),await Rt(0),V(p,!0),await v(),V(g,!0))},y=async()=>{if(!i()||!i().open)return;const{returnValue:x}=i();e.onClosing?.(new CustomEvent("Closing")),document.body.inert=!0,i().close(),document.body.inert=!1,V(g,!1),V(p,!1),await v(),V(m,!1),x==="ok"&&e.onOk?.(new CustomEvent("Ok")),x==="cancel"&&e.onCancel?.(new CustomEvent("Cancel")),e.onClose?.(new CustomEvent("Close",{detail:{returnValue:x}})),i(i().returnValue="",!0)};ze(()=>{r()?b():y()}),Vt(()=>{const x=hm(L6,{target:document.querySelector(".sui.app-shell")??document.body,props:{children:n}});return()=>{i()?.close(),vC(x)}});var w={focus:f,close:h};return se(w)}var R6=j('<div role="none"><!></div>');const M6={hash:"svelte-1hj4mag",code:".content.svelte-1hj4mag {position:absolute;overflow-y:auto;outline-width:0 !important;width:auto;color:var(--sui-primary-foreground-color);background-color:var(--sui-secondary-background-color-translucent);box-shadow:0 8px 16px var(--sui-popup-shadow-color);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);transition-property:opacity, transform;}.content.menu.svelte-1hj4mag {border-width:var(--sui-menu-border-width, 1px);border-style:var(--sui-menu-border-style, solid);border-color:var(--sui-menu-border-width, var(--sui-secondary-border-color));border-radius:var(--sui-menu-border-radius, 4px);padding:var(--sui-menu-padding, 4px);}.content.menu.svelte-1hj4mag .sui.menu {border-width:0;border-radius:0;padding:0;background-color:transparent;}.content.listbox.svelte-1hj4mag {border-width:var(--sui-listbox-border-width, 1px);border-style:var(--sui-listbox-border-style, solid);border-color:var(--sui-listbox-border-width, var(--sui-secondary-border-color));border-radius:var(--sui-listbox-border-radius, 4px);padding:var(--sui-listbox-padding, 4px);}.content.listbox.svelte-1hj4mag .sui.listbox {border-width:0;border-radius:0;padding:0;background-color:transparent;}.content.touch.svelte-1hj4mag {position:static;border-width:0 !important;border-radius:4px !important;padding:8px;min-width:320px !important;max-width:calc(100dvw - 32px) !important;max-height:calc(100dvh - 32px) !important;}dialog.open .content.touch.svelte-1hj4mag {transform:scale(100%) !important;}dialog:not(.open) .content.touch.svelte-1hj4mag {transform:scale(90%);}.content.touch.combobox.svelte-1hj4mag .sui.listbox {gap:4px;padding:8px 4px !important;}dialog.open .content.svelte-1hj4mag {transition-duration:50ms;opacity:1;transform:translateY(2px);}dialog:not(.open) .content.svelte-1hj4mag {transition-duration:300ms;opacity:0;transform:translateY(-8px);}"};function Ym(t,e){ae(e,!0),ke(t,M6);const n=()=>H(c(w),"$style",r),[r,i]=ve(),o=O=>{var I=R6();let L,D;var B=F(I);Ue(B,()=>e.children??He),St(I,K=>l(K),()=>l()),Z(()=>{Se(I,"hidden",!a()),L=hn(I,1,`content ${e.class??""} ${c(y)??""}`,"svelte-1hj4mag",L,{touch:c(A)}),D=Co(I,"",D,{inset:n().inset,"z-index":n().zIndex,"min-width":n().minWidth,"max-width":n().maxWidth,"max-height":n().height,visibility:n().inset?void 0:"hidden"})}),ui("mouseenter",I,()=>{s(!0),h()&&window.clearTimeout(E)}),ui("mouseleave",I,()=>{s(!1),h()&&(E=window.setTimeout(()=>{a(!1)},200))}),S(O,I)};let a=N(e,"open",15,!1),s=N(e,"hovered",15,!1),l=N(e,"content",15,void 0),u=N(e,"showBackdrop",3,void 0),d=N(e,"position",3,"bottom-left"),f=N(e,"positionBaseElement",3,void 0),h=N(e,"parentDialogElement",3,void 0),p=N(e,"touchOptimized",3,!1),g=ot(e,["$$slots","$$events","$$legacy","open","hovered","content","class","showBackdrop","anchor","position","positionBaseElement","parentDialogElement","touchOptimized","children","onOpen"]),m=ie(!1),v=ie(void 0),b=ie(!1),y=ie(void 0),w=ie(At(it({inset:void 0,zIndex:void 0,width:void 0,height:void 0}))),x,E=0;const $=()=>{x=O6(e.anchor,c(v),d(),f()),YD(V(w,x.style,!0),"$style",r),x.open.subscribe(O=>{a(O)}),V(y,e.anchor?.getAttribute("aria-haspopup")??void 0,!0),V(m,!0)};ze(()=>{h()&&!c(v)&&l()&&(V(v,h()),c(v).append(l()))}),ze(()=>{e.anchor&&c(v)&&!c(m)&&$()}),ze(()=>{h()&&a()&&x?.checkPosition()});const A=_(()=>p()&&c(b));Vt(()=>{V(b,globalThis.matchMedia("(pointer: coarse)").matches,!0)});var k=X(),T=M(k);{var C=O=>{o(O)},P=O=>{{let I=_(()=>u()??c(A));uL(O,Qt(()=>g,{role:"none",class:"popup",get showBackdrop(){return c(I)},lightDismiss:!0,keepContent:!0,onOpen:async L=>{if(e.onOpen?.(L),await Rt(100),!l())return;const D=l().querySelector('[tabindex]:not([aria-disabled="true"])');D?D.focus():(l(l().tabIndex=-1,!0),l().focus())},get dialog(){return c(v)},set dialog(L){V(v,L,!0)},get open(){return a()},set open(L){a(L)},children:(L,D)=>{o(L)},$$slots:{default:!0}}))}};U(T,O=>{h()?O(C):O(P,!1)})}S(t,k),se(),i()}var D6=j('<span role="none" class="label svelte-1l1q3t6"><!></span>'),F6=j('<span role="none" class="label svelte-1l1q3t6"><!></span>'),z6=j('<span role="none" class="label svelte-1l1q3t6"><!></span>'),j6=j("<!> <!>",1),U6=j("<button><!> <!> <!></button> <!>",1);const B6={hash:"svelte-1l1q3t6",code:"button.svelte-1l1q3t6 {flex:none;display:inline-flex;align-items:center;gap:4px;margin:var(--sui-focus-ring-width);border-width:0;border-style:solid;border-color:transparent;padding:0;color:var(--sui-control-foreground-color, inherit);background-color:transparent;box-shadow:none;font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);font-weight:var(--sui-font-weight-normal, normal);text-align:start;cursor:pointer;transition:all 200ms;}button[hidden].svelte-1l1q3t6 {display:none !important;}button.svelte-1l1q3t6:not(:disabled):focus-visible {z-index:1;}button.svelte-1l1q3t6:is(.primary:where(.svelte-1l1q3t6), .secondary:where(.svelte-1l1q3t6), .tertiary:where(.svelte-1l1q3t6), .ghost:where(.svelte-1l1q3t6)) {justify-content:center;border-width:1px;}button.svelte-1l1q3t6:is(.primary:where(.svelte-1l1q3t6), .secondary:where(.svelte-1l1q3t6), .tertiary:where(.svelte-1l1q3t6), .ghost:where(.svelte-1l1q3t6)) .label:where(.svelte-1l1q3t6):only-child {padding:0 4px;}button.primary.svelte-1l1q3t6 {border-width:var(--sui-button-primary-border-width, 1px);border-style:var(--sui-button-primary-border-style, solid);border-color:var(--sui-button-primary-border-color, var(--sui-primary-accent-color));color:var(--sui-button-primary-foreground-color, var(--sui-primary-accent-color-inverted));background-color:var(--sui-button-primary-background-color, var(--sui-primary-accent-color));font-weight:var(--sui-button-primary-font-weight, var(--sui-font-weight-normal, normal));}button.primary.svelte-1l1q3t6:is(:where(.svelte-1l1q3t6):hover, :where(.svelte-1l1q3t6):focus-visible, [aria-expanded=true]:where(.svelte-1l1q3t6)) {color:var(--sui-button-primary-foreground-color-focus, var(--sui-button-primary-foreground-color, var(--sui-primary-accent-color-inverted)));background-color:var(--sui-button-primary-background-color-focus, var(--sui-primary-accent-color-light));}button.primary.svelte-1l1q3t6:active {color:var(--sui-button-primary-foreground-color-active, var(--sui-button-primary-foreground-color, var(--sui-primary-accent-color-inverted)));background-color:var(--sui-button-primary-background-color-active, var(--sui-primary-accent-color-dark));}button.secondary.svelte-1l1q3t6 {border-width:var(--sui-button-secondary-border-width, 1px);border-style:var(--sui-button-secondary-border-style, solid);border-color:var(--sui-button-secondary-border-color, var(--sui-primary-accent-color));color:var(--sui-button-secondary-foreground-color, var(--sui-primary-accent-color-text));background-color:var(--sui-button-secondary-background-color, var(--sui-button-background-color));font-weight:var(--sui-button-secondary-font-weight, var(--sui-font-weight-normal, normal));}button.secondary.svelte-1l1q3t6:is(:where(.svelte-1l1q3t6):hover, :where(.svelte-1l1q3t6):focus-visible, [aria-expanded=true]:where(.svelte-1l1q3t6)) {color:var(--sui-button-secondary-foreground-color-focus, var(--sui-button-secondary-foreground-color, var(--sui-primary-accent-color-text)));background-color:var(--sui-button-secondary-background-color-focus, var(--sui-hover-background-color));}button.secondary.svelte-1l1q3t6:active {color:var(--sui-button-secondary-foreground-color-active, var(--sui-button-secondary-foreground-color, var(--sui-primary-accent-color-text)));background-color:var(--sui-button-secondary-background-color-active, var(--sui-active-background-color));}button.secondary[aria-pressed=true].svelte-1l1q3t6 {color:var(--sui-button-secondary-foreground-color-pressed);background-color:var(--sui-button-secondary-background-color-pressed, var(--sui-primary-accent-color));}button.tertiary.svelte-1l1q3t6 {border-width:var(--sui-button-tertiary-border-width, 1px);border-style:var(--sui-button-tertiary-border-style, solid);border-color:var(--sui-button-tertiary-border-color, var(--sui-button-border-color));color:var(--sui-button-tertiary-foreground-color, var(--sui-highlight-foreground-color));background-color:var(--sui-button-tertiary-background-color, var(--sui-button-background-color));font-weight:var(--sui-button-tertiary-font-weight, var(--sui-font-weight-normal, normal));}button.tertiary.svelte-1l1q3t6:is(:where(.svelte-1l1q3t6):hover, :where(.svelte-1l1q3t6):focus-visible, [aria-expanded=true]:where(.svelte-1l1q3t6)) {color:var(--sui-button-tertiary-foreground-color-focus, var(--sui-button-tertiary-foreground-color, var(--sui-highlight-foreground-color)));background-color:var(--sui-button-tertiary-background-color-focus, var(--sui-hover-background-color));}button.tertiary.svelte-1l1q3t6:active {color:var(--sui-button-tertiary-foreground-color-active, var(--sui-button-tertiary-foreground-color, var(--sui-highlight-foreground-color)));background-color:var(--sui-button-tertiary-background-color-active, var(--sui-active-background-color));}button.tertiary[aria-pressed=true].svelte-1l1q3t6 {color:var(--sui-button-tertiary-foreground-color-pressed);background-color:var(--sui-button-tertiary-background-color-pressed, var(--sui-selected-background-color));}button.ghost.svelte-1l1q3t6 {font-weight:var(--sui-button-ghost-font-weight, var(--sui-font-weight-normal, normal));}button.ghost.svelte-1l1q3t6:is(:where(.svelte-1l1q3t6):hover, :where(.svelte-1l1q3t6):focus-visible, [aria-expanded=true]:where(.svelte-1l1q3t6)) {color:var(--sui-button-ghost-foreground-color-focus);background-color:var(--sui-button-ghost-background-color-focus, var(--sui-hover-background-color));}button.ghost.svelte-1l1q3t6:active {color:var(--sui-button-ghost-foreground-color-active);background-color:var(--sui-button-ghost-background-color-active, var(--sui-active-background-color));}button.ghost[aria-pressed=true].svelte-1l1q3t6 {color:var(--sui-button-ghost-foreground-color-pressed);background-color:var(--sui-button-ghost-background-color-pressed, var(--sui-selected-background-color));}button.link.svelte-1l1q3t6 {outline:0;margin:0;border-radius:0 !important;padding:0 !important;height:auto !important;color:var(--sui-button-link-foreground-color, var(--sui-primary-accent-color-text));}button.link.svelte-1l1q3t6 .label:where(.svelte-1l1q3t6) {padding:0;line-height:var(--sui-line-height-compact);text-decoration:var(--sui-button-link-text-decoration, none);text-underline-offset:2px;white-space:normal;}:is(:root, :host)[data-underline-links='true'] button.link.svelte-1l1q3t6 .label:where(.svelte-1l1q3t6) {text-decoration:underline;}button.link.svelte-1l1q3t6:is(:where(.svelte-1l1q3t6):hover, :where(.svelte-1l1q3t6):focus, :where(.svelte-1l1q3t6):active) .label:where(.svelte-1l1q3t6) {text-decoration:var(--sui-button-link-text-decoration-focus, underline);}button.small.svelte-1l1q3t6 {border-radius:var(--sui-button-small-border-radius);padding:var(--sui-button-small-padding);height:var(--sui-button-small-height);font-size:var(--sui-button-small-font-size, var(--sui-font-size-small));}button.small.svelte-1l1q3t6 .icon {font-size:var(--sui-font-size-large);}button.medium.svelte-1l1q3t6 {border-radius:var(--sui-button-medium-border-radius);padding:var(--sui-button-medium-padding);height:var(--sui-button-medium-height);font-size:var(--sui-button-medium-font-size, var(--sui-font-size-default));}button.large.svelte-1l1q3t6 {border-radius:var(--sui-button-large-border-radius);padding:var(--sui-button-large-padding);height:var(--sui-button-large-height);font-size:var(--sui-button-large-font-size, var(--sui-font-size-large));}button.pill.svelte-1l1q3t6 {border-radius:80px;padding:var(--sui-button-medium-pill-padding, 0 12px);}button.flex.svelte-1l1q3t6 {flex:auto;width:-moz-available;width:-webkit-fill-available;width:stretch;}button.iconic.svelte-1l1q3t6 {justify-content:center;padding:0;aspect-ratio:1/1;}button.danger.svelte-1l1q3t6 {background-color:var(--sui-error-background-color);}button.svelte-1l1q3t6 .label:where(.svelte-1l1q3t6) {padding:0 4px;}button.svelte-1l1q3t6 > * {pointer-events:none;}button.svelte-1l1q3t6 :has([slot=start-icon] + [slot=end-icon]) {gap:0;}"};function et(t,e){ae(e,!0),ke(t,B6);let n=N(e,"element",15),r=N(e,"class",3,""),i=N(e,"type",3,"button"),o=N(e,"role",3,"button"),a=N(e,"name",3,void 0),s=N(e,"value",3,void 0),l=N(e,"valueType",19,()=>typeof s()),u=N(e,"hidden",3,!1),d=N(e,"disabled",3,!1),f=N(e,"readonly",3,!1),h=N(e,"pressed",3,void 0),p=N(e,"keyShortcuts",3,void 0),g=N(e,"label",3,""),m=N(e,"lines",3,1),v=N(e,"variant",3,void 0),b=N(e,"size",3,"medium"),y=N(e,"iconic",3,!1),w=N(e,"pill",3,!1),x=N(e,"flex",3,!1),E=N(e,"popupPosition",3,"bottom-left"),$=N(e,"showPopupBackdrop",3,!1),A=ot(e,["$$slots","$$events","$$legacy","element","class","type","role","name","value","valueType","hidden","disabled","readonly","pressed","keyShortcuts","label","lines","variant","size","iconic","pill","flex","popupPosition","showPopupBackdrop","children","startIcon","endIcon","popup"]);var k=U6(),T=M(k);mt(T,()=>({...A,class:`sui button ${v()??""} ${b()??""} ${r()??""}`,type:i(),name:a(),value:s(),hidden:u(),disabled:d(),role:o(),"aria-hidden":u(),"aria-disabled":d(),"aria-readonly":f(),"aria-pressed":h(),"data-type":l(),"data-name":a(),"data-label":g(),"data-value":s(),[Nr]:{iconic:y(),pill:w(),flex:x()}}),void 0,void 0,void 0,"svelte-1l1q3t6");var C=F(T);Ue(C,()=>e.startIcon??He);var P=z(C,2);{var O=K=>{var G=X(),W=M(G);{var Y=q=>{var J=D6(),Q=F(J);Ur(Q,{get lines(){return m()},children:(ee,re)=>{var te=Fe();Z(()=>ne(te,g())),S(ee,te)},$$slots:{default:!0}}),S(q,J)},R=q=>{var J=F6(),Q=F(J);Ue(Q,()=>e.children??He),S(q,J)};U(W,q=>{g()?q(Y):q(R,!1)})}S(K,G)},I=K=>{var G=j6(),W=M(G);{var Y=q=>{var J=z6(),Q=F(J);Ur(Q,{get lines(){return m()},children:(ee,re)=>{var te=Fe();Z(()=>ne(te,g())),S(ee,te)},$$slots:{default:!0}}),S(q,J)};U(W,q=>{g()&&q(Y)})}var R=z(W,2);Ue(R,()=>e.children??He),S(K,G)};U(P,K=>{v()==="link"?K(O):K(I,!1)})}var L=z(P,2);Ue(L,()=>e.endIcon??He),St(T,K=>n(K),()=>n()),Vs(T,(K,G)=>cL?.(K,G),p);var D=z(T,2);{var B=K=>{Ym(K,{get anchor(){return n()},get position(){return E()},get showBackdrop(){return $()},touchOptimized:!0,children:(G,W)=>{var Y=X(),R=M(Y);Ue(R,()=>e.popup),S(G,Y)},$$slots:{default:!0}})};U(D,K=>{e.popup&&K(B)})}S(t,k),se()}var q6=j('<div role="none"><!></div>'),H6=j('<div role="none"><div role="alert" class="message svelte-12jije3"><!> <!></div> <!></div>');const K6={hash:"svelte-12jije3",code:".infobar.svelte-12jije3 {flex:none;display:flex;align-items:center;gap:var(--sui-infobar-gap, 8px);border-width:var(--sui-infobar-border-width, 0 0 1px);border-style:var(--sui-infobar-border-style, solid);padding:var(--sui-infobar-padding, 0);min-height:var(--sui-infobar-min-height, 32px);font-size:var(--sui-infobar-font-size, var(--sui-font-size-small));}.infobar.info.svelte-12jije3 {border-color:var(--sui-info-border-color);color:var(--sui-info-foreground-color);background-color:var(--sui-info-background-color);}.infobar.warning.svelte-12jije3 {border-color:var(--sui-warning-border-color);color:var(--sui-warning-foreground-color);background-color:var(--sui-warning-background-color);}.infobar.error.svelte-12jije3 {border-color:var(--sui-error-border-color);color:var(--sui-error-foreground-color);background-color:var(--sui-error-background-color);}.infobar.success.svelte-12jije3 {border-color:var(--sui-success-border-color);color:var(--sui-success-foreground-color);background-color:var(--sui-success-background-color);}.message.svelte-12jije3 {flex:auto;display:flex;align-items:center;justify-content:var(--sui-infobar-message-justify-content, start);gap:var(--sui-infobar-message-gap, 6px);padding:var(--sui-infobar-message-padding, 0 8px);}.message.svelte-12jije3 button {font-size:inherit !important;}.message.svelte-12jije3 .icon {font-size:16px; /* !hardcoded */}"};function Jm(t,e){ae(e,!0),ke(t,K6);const n=()=>H(ce,"$_",r),[r,i]=ve();let o=N(e,"show",15,!0),a=N(e,"dismissible",3,!0),s=N(e,"status",3,"info"),l=N(e,"children",3,void 0),u=N(e,"icon",3,void 0);var d=X(),f=M(d);{var h=p=>{var g=H6(),m=F(g),v=F(m);{var b=$=>{var A=X(),k=M(A);Ue(k,u),S($,A)},y=$=>{{let A=_(()=>s()==="success"?"check_circle":s());Qe($,{get name(){return c(A)}})}};U(v,$=>{u()?$(b):$(y,!1)})}var w=z(v,2);Ue(w,()=>l()??He);var x=z(m,2);{var E=$=>{var A=q6(),k=F(A);{let T=_(()=>n()("_sui.dismiss"));et(k,{iconic:!0,size:"small",variant:"ghost",get"aria-label"(){return c(T)},onclick:()=>{o(!1)},children:(C,P)=>{Qe(C,{name:"close"})},$$slots:{default:!0}})}S($,A)};U(x,$=>{a()&&$(E)})}Z(()=>hn(g,1,`infobar ${s()??""}`,"svelte-12jije3")),S(p,g)};U(f,p=>{o()&&p(h)})}S(t,d),se(),i()}var V6=j("<div><!></div>");const G6={hash:"svelte-kggzik",code:".bottom-navigation.svelte-kggzik {height:var(--sui-bottom-navigation-height, var(--sui-primary-toolbar-size));border-top-width:var(--sui-bottom-navigation-border-color, 1px);border-top-style:var(--sui-bottom-navigation-border-style, solid);border-top-color:var(--sui-bottom-navigation-border-color, var(--sui-secondary-border-color));}.bottom-navigation.svelte-kggzik:is([inert]:where(.svelte-kggzik), [hidden]:where(.svelte-kggzik)) {display:none;}.bottom-navigation.svelte-kggzik .buttons {flex:auto;display:flex;align-items:center;justify-content:space-evenly;}"};function W6(t,e){ke(t,G6);let n=ot(e,["$$slots","$$events","$$legacy","class","children"]);var r=V6();mt(r,()=>({role:"none",class:`sui bottom-navigation ${e.class??""}`,...n}),void 0,void 0,void 0,"svelte-kggzik");var i=F(r);Ue(i,()=>e.children??He),S(t,r)}var Y6=j("<div><!></div>");const J6={hash:"svelte-1hdsepk",code:".button-group.svelte-1hdsepk {flex:none;display:inline-flex;align-items:center;}"};function X6(t,e){ke(t,J6);let n=ot(e,["$$slots","$$events","$$legacy","class","children"]);var r=Y6();mt(r,()=>({...n,role:"group",class:`sui button-group ${e.class??""}`}),void 0,void 0,void 0,"svelte-1hdsepk");var i=F(r);Ue(i,()=>e.children??He),S(t,r)}var Z6=j('<div role="none" class="sui floating-action-button-wrapper svelte-wt2cre"><!></div>');const Q6={hash:"svelte-wt2cre",code:`.floating-action-button-wrapper.svelte-wt2cre {display:contents;}
|
|
349
|
+
@media (width < 768px) {.floating-action-button-wrapper.svelte-wt2cre {display:block;position:fixed;inset-inline-end:16px;inset-block-end:72px;z-index:100;}.floating-action-button-wrapper.svelte-wt2cre button {border-radius:50%;height:56px;box-shadow:0 4px 8px rgba(0, 0, 0, 0.4);}.floating-action-button-wrapper.svelte-wt2cre button .icon {font-size:32px;}
|
|
350
|
+
}`};function dL(t,e){ke(t,Q6);let n=N(e,"children",3,void 0);var r=Z6(),i=F(r);Ue(i,()=>n()??He),S(t,r)}const fL=t=>{const{type:e="string",name:n,label:r}=t.dataset;let{value:i}=t.dataset;return e==="number"?(i=Number(i),Number.isNaN(i)&&(i=null)):e==="boolean"?i=i==="true":e==="string"&&(i=i?String(i):""),{target:t,type:e,name:n,label:r,value:i}},lE=t=>(t=t.trim(),t?t.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLocaleLowerCase():""),eH={grid:{orientation:"vertical",childRoles:["row"],childSelectedAttr:"aria-selected",focusChild:!0,selectFirst:!0},listbox:{orientation:"vertical",childRoles:["option"],childSelectedAttr:"aria-selected",focusChild:!1,selectFirst:!1},menu:{orientation:"vertical",childRoles:["menuitem","menuitemcheckbox","menuitemradio"],childSelectedAttr:"aria-checked",focusChild:!0,selectFirst:!1},menubar:{orientation:"horizontal",childRoles:["menuitem","menuitemcheckbox","menuitemradio"],childSelectedAttr:"aria-checked",focusChild:!0,selectFirst:!1},radiogroup:{orientation:"horizontal",childRoles:["radio"],childSelectedAttr:"aria-checked",focusChild:!0,selectFirst:!1},tablist:{orientation:"horizontal",childRoles:["tab"],childSelectedAttr:"aria-selected",focusChild:!0,selectFirst:!0}};let tH=class{constructor(e,{clickToSelect:n=!0}={}){e.dispatchEvent(new CustomEvent("Initializing")),this.parent=e,this.role=e.getAttribute("role"),this.multi=this.parent.getAttribute("aria-multiselectable")==="true",this.id=b0(this.role),this.parentGroupSelector=`[role="group"], [role="${this.role}"]`,this.clickToSelect=n;const{orientation:r,childRoles:i,childSelectedAttr:o,focusChild:a,selectFirst:s}=eH[this.role];this.orientation=this.grid?"horizontal":this.parent.getAttribute("aria-orientation")??r,this.childRoles=i,this.childSelectedAttr=o,this.childSelectedProp=o.replace("aria-",""),this.focusChild=a,this.selectFirst=s,this.parent.tabIndex=a?-1:0,(async()=>(await Rt(100),this.activate()))()}activate(){const{parent:e,allMembers:n,selected:r}=this;n.forEach((i,o)=>{const a=i.getAttribute(this.childSelectedAttr)==="true"||(r?i===r:this.selectFirst&&o===0),s=document.querySelector(`#${i.getAttribute("aria-controls")}`);i.id||=`${this.id}-item-${o+1}`,i.tabIndex=a?0:-1,i.setAttribute(this.childSelectedAttr,String(a)),s&&(s.inert=!a,s.setAttribute("aria-labelledby",i.id),s.setAttribute("aria-hidden",String(!a)),a&&globalThis.setTimeout(()=>{try{s.scrollIntoView({block:"nearest",inline:"nearest",behavior:"auto"})}catch{s.scrollIntoView(!0)}},300))}),e.addEventListener("click",i=>{this.onClick(i)}),e.addEventListener("keydown",i=>{this.onKeyDown(i)}),e.dispatchEvent(new CustomEvent("Initialized"))}get selector(){return this.childRoles.map(e=>`[role="${e}"]`).join(",")}get allMembers(){return[...this.parent.querySelectorAll(this.selector)]}get activeMembers(){return this.allMembers.filter(e=>!e.matches('[aria-disabled="true"], [aria-hidden="true"]'))}get selected(){return this.activeMembers.find(e=>e.matches(`[${this.childSelectedAttr}="true"]`))}get isDisabled(){return this.parent.matches('[aria-disabled="true"]')}get isReadOnly(){return this.parent.matches('[aria-readonly="true"]')}get grid(){return this.role==="grid"||this.role==="listbox"&&this.parent.matches(".grid")}selectTarget(e,n){if(this.isDisabled||this.isReadOnly){e.preventDefault();return}const r=n.getAttribute("role"),i=n.closest(this.parentGroupSelector),o=e.type==="click",a=e.type==="keydown"&&e.key===" ";this.activeMembers.forEach(s=>{const l=s.matches('[role="menuitemcheckbox"]'),u=s.matches('[role="menuitemradio"]');if((l||u)&&(s.getAttribute("role")!==r||s.closest(this.parentGroupSelector)!==i))return;const d=l||this.multi,f=u||!d,h=s===n,p=s.matches(`[${this.childSelectedAttr}="true"]`),g=s.getAttribute("aria-controls"),m=g?document.getElementById(g):null;d&&h&&(o||a)&&(s.setAttribute(this.childSelectedAttr,String(!p)),s.dispatchEvent(new CustomEvent("Change",{detail:{[this.childSelectedProp]:!p}})),p||s.dispatchEvent(new CustomEvent("Select"))),f&&p!==h&&(!u||a||o)&&(s.setAttribute(this.childSelectedAttr,String(h)),s.dispatchEvent(new CustomEvent("Change",{detail:{[this.childSelectedProp]:h}})),h&&(e.type==="keydown"&&s.matches('[role="radio"]')&&s.click(),s.dispatchEvent(new CustomEvent("Select")))),this.focusChild?globalThis.requestAnimationFrame(()=>{s.tabIndex=h?0:-1,h&&(s.focus(),s.dispatchEvent(new CustomEvent("Focus")))}):(s.classList.toggle("focused",h),h&&s.dispatchEvent(new CustomEvent("Focus"))),m&&(m.inert=!h,m.setAttribute("aria-hidden",String(!h)),h&&globalThis.setTimeout(()=>{try{m.scrollIntoView({block:"nearest",inline:"nearest",behavior:"auto"})}catch{m.scrollIntoView(!0)}},300)),h&&(this.parent.setAttribute("aria-activedescendant",s.id),globalThis.setTimeout(()=>{try{s.scrollIntoView({block:"nearest",inline:"nearest",behavior:"auto"})}catch{s.scrollIntoView(!0)}},300))}),this.parent.dispatchEvent(new CustomEvent("Change",{detail:fL(n)}))}onClick(e){const n=e.target,r=n.matches(this.selector)?n:n.closest(this.selector);!r||e.button!==0||!this.clickToSelect||this.selectTarget(e,r)}onKeyDown(e){const{key:n,ctrlKey:r,metaKey:i,shiftKey:o,altKey:a}=e;if(o||a||r||i)return;const l=e.target,{allMembers:u,activeMembers:d}=this,f=(()=>{if(!this.focusChild)return d.find(g=>g.matches(".focused"));if(l.matches(this.selector))return l})();if(["Enter"," ","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(n)&&e.preventDefault(),n==="Enter"){f?.click();return}if(n===" "){f&&this.selectTarget(e,f);return}let h,p;if(this.grid){const g=Math.floor(this.parent.clientWidth/d[0].clientWidth),m=oe(Gl);h=f?u.indexOf(f):-1,n==="ArrowUp"&&h>0&&(p=u[h-g]),n==="ArrowDown"&&h<u.length-1&&(p=u[h+g]),n==="ArrowLeft"&&h>0&&(p=u[h+(m?1:-1)]),n==="ArrowRight"&&h<u.length-1&&(p=u[h+(m?-1:1)]),p?.matches('[aria-disabled="true"], [aria-hidden="true"]')&&(p=void 0)}else{h=f?d.indexOf(f):-1;const g=oe(Gl),m=this.orientation==="horizontal"?g?"ArrowRight":"ArrowLeft":"ArrowUp",v=this.orientation==="horizontal"?g?"ArrowLeft":"ArrowRight":"ArrowDown";n===m&&(h>0&&(p=d[h-1]),h===0&&(p=d[d.length-1])),n===v&&(h<d.length-1&&(p=d[h+1]),h===d.length-1&&([p]=d))}p&&p!==f&&this.selectTarget(e,p)}onUpdate({searchTerms:e}){const n=lE(e),r=n?n.split(/\s+/):[],i=this.allMembers.map(o=>{const a=lE(o.dataset.searchValue??o.dataset.label??o.querySelector(".label")?.textContent??o.textContent??""),s=!r.every(l=>a.includes(l));return o.dispatchEvent(new CustomEvent("Toggle",{detail:{hidden:s}})),s}).filter(o=>!o).length;this.parent.dispatchEvent(new CustomEvent("Filter",{detail:{matched:i,total:this.allMembers.length}}))}};const gd=(t,e)=>{const n=new tH(t,e);return{update(r){n.onUpdate(r)}}};var nH=j('<div><div role="none" class="inner svelte-o7p3ot"><!></div></div>');const rH={hash:"svelte-o7p3ot",code:".select-button-group.svelte-o7p3ot {flex:none;display:inline-flex;align-items:center;margin:var(--sui-focus-ring-width);}.select-button-group.svelte-o7p3ot:focus-visible {outline-width:0 !important;}.select-button-group.svelte-o7p3ot button {margin:0 !important;border-radius:0 !important;color:var(--sui-primary-foreground-color);}.select-button-group.svelte-o7p3ot button:first-child {border-start-start-radius:4px !important;border-end-start-radius:4px !important;}.select-button-group.svelte-o7p3ot button:not(:first-child) {border-inline-start-width:0;}.select-button-group.svelte-o7p3ot button:last-child {border-start-end-radius:4px !important;border-end-end-radius:4px !important;}.select-button-group.svelte-o7p3ot button[aria-checked=true] {color:var(--sui-highlight-foreground-color);background-color:var(--sui-selected-background-color);}.select-button-group.svelte-o7p3ot [aria-invalid=true] button {border-color:var(--sui-error-border-color);}.select-button-group.svelte-o7p3ot [aria-disabled=false] button[aria-disabled=true] {filter:grayscale(0) opacity(1);}.select-button-group.svelte-o7p3ot [aria-disabled=false] button[aria-disabled=true] * {filter:grayscale(1) opacity(0.35);}.inner.svelte-o7p3ot {display:contents;}"};function Xm(t,e){ke(t,rH);let n=N(e,"hidden",3,!1),r=N(e,"disabled",3,!1),i=N(e,"readonly",3,!1),o=N(e,"required",3,!1),a=N(e,"invalid",3,!1),s=ot(e,["$$slots","$$events","$$legacy","class","hidden","disabled","readonly","required","invalid","children"]);var l=nH();mt(l,()=>({...s,role:"radiogroup",class:`sui select-button-group ${e.class??""}`,hidden:n(),tabindex:"-1","aria-hidden":n(),"aria-disabled":r(),"aria-readonly":i(),"aria-required":o(),"aria-invalid":a()}),void 0,void 0,void 0,"svelte-o7p3ot");var u=F(l),d=F(u);Ue(d,()=>e.children??He),Vs(l,f=>gd?.(f)),Z(()=>u.inert=r()),S(t,l)}function Qf(t,e){ae(e,!0);let n=N(e,"selected",15,!1),r=ot(e,["$$slots","$$events","$$legacy","selected","class","onChange"]);et(t,Qt(()=>r,{role:"radio",get class(){return`sui select-button ${e.class??""}`},get"aria-checked"(){return n()},onChange:i=>{n(i.detail.selected),e.onChange?.(i)}})),se()}var iH=j("<!> <!>",1);function ei(t,e){ae(e,!0);let n=N(e,"hidden",3,!1),r=N(e,"disabled",3,!1),i=N(e,"popupPosition",3,"bottom-left"),o=N(e,"popupPositionBaseElement",3,void 0),a=N(e,"showPopupBackdrop",3,!1),s=N(e,"label",3,""),l=N(e,"variant",3,void 0),u=N(e,"size",3,"medium"),d=N(e,"iconic",3,!1),f=ot(e,["$$slots","$$events","$$legacy","class","hidden","disabled","popupPosition","popupPositionBaseElement","showPopupBackdrop","label","variant","size","iconic","children","startIcon","endIcon","popup"]),h=ie(void 0);var g={focus:()=>{c(h)?.focus()}},m=iH(),v=M(m);et(v,Qt(()=>f,{get class(){return`sui menu-button ${e.class??""}`},get hidden(){return n()},get disabled(){return r()},get label(){return s()},get variant(){return l()},get size(){return u()},get iconic(){return d()},"aria-haspopup":"menu",get element(){return c(h)},set element(E){V(h,E,!0)},startIcon:E=>{var $=X(),A=M($);Ue(A,()=>e.startIcon??He),S(E,$)},children:E=>{var $=X(),A=M($);Ue(A,()=>e.children??He),S(E,$)},endIcon:E=>{var $=X(),A=M($);{var k=C=>{var P=X(),O=M(P);Ue(O,()=>e.endIcon),S(C,P)},T=C=>{var P=X(),O=M(P);{var I=D=>{Qe(D,{name:"more_vert"})},L=D=>{Qe(D,{name:"arrow_drop_down",class:"small-arrow"})};U(O,D=>{d()?D(I):D(L,!1)},!0)}S(C,P)};U(A,C=>{e.endIcon?C(k):C(T,!1)})}S(E,$)},$$slots:{startIcon:!0,default:!0,endIcon:!0}}));var b=z(v,2);return Ym(b,{get anchor(){return c(h)},get position(){return i()},get positionBaseElement(){return o()},get showBackdrop(){return a()},children:(y,w)=>{var x=X(),E=M(x);Ue(E,()=>e.popup??He),S(y,x)},$$slots:{default:!0}}),S(t,m),se(g)}var oH=j('<div role="group" class="sui split-button svelte-1rw3a89"><!> <!></div>');const aH={hash:"svelte-1rw3a89",code:".split-button.svelte-1rw3a89 {flex:none;display:inline-flex;margin:var(--sui-focus-ring-width);}.split-button.svelte-1rw3a89 button {margin:0;}.split-button.svelte-1rw3a89 button.menu-button {border-inline-start-width:0;border-start-start-radius:0;border-end-start-radius:0;aspect-ratio:3/4;}.split-button.svelte-1rw3a89 button:not(.menu-button) {border-start-end-radius:0;border-end-end-radius:0;}"};function hL(t,e){ae(e,!0),ke(t,aH);const n=()=>H(ce,"$_",r),[r,i]=ve();let o=N(e,"hidden",3,!1),a=N(e,"disabled",3,!1),s=N(e,"label",3,""),l=N(e,"variant",3,void 0),u=N(e,"size",3,"medium"),d=N(e,"popupPosition",3,"bottom-left"),f=N(e,"showPopupBackdrop",3,!1),h=ot(e,["$$slots","$$events","$$legacy","hidden","disabled","label","variant","size","popupPosition","showPopupBackdrop","chevronIcon","popup"]),p=ie(void 0);var g=oH(),m=F(g);et(m,Qt(()=>h,{get hidden(){return o()},get disabled(){return a()},get label(){return s()},get variant(){return l()},get size(){return u()}}));var v=z(m,2);{const b=x=>{var E=X(),$=M(E);{var A=T=>{var C=X(),P=M(C);Ue(P,()=>e.chevronIcon),S(T,C)},k=T=>{Qe(T,{name:"arrow_drop_down",class:"small-arrow"})};U($,T=>{e.chevronIcon?T(A):T(k,!1)})}S(x,E)},y=x=>{var E=X(),$=M(E);Ue($,()=>e.popup??He),S(x,E)};let w=_(()=>n()("_sui.split_button.more_options"));ei(v,{iconic:!0,get hidden(){return o()},get disabled(){return a()},get variant(){return l()},get size(){return u()},get"aria-label"(){return c(w)},get popupPosition(){return d()},get popupPositionBaseElement(){return c(p)},get showPopupBackdrop(){return f()},endIcon:b,popup:y,$$slots:{endIcon:!0,popup:!0}})}St(g,b=>V(p,b),()=>c(p)),Z(b=>{Se(g,"hidden",o()),Se(g,"aria-hidden",o()),Se(g,"aria-disabled",a()),Se(g,"aria-label",b)},[()=>n()("_sui.split_button.x_options",{values:{name:s()}})]),S(t,g),se(),i()}var sH=j("<div></div>");const lH={hash:"svelte-o0tys8",code:".divider.svelte-o0tys8 {flex:none;background-color:var(--sui-secondary-border-color);}.divider[aria-orientation=horizontal].svelte-o0tys8 {margin:8px 0;width:100%;height:1px;}.divider[aria-orientation=vertical].svelte-o0tys8 {margin:0 8px;width:1px;height:100%;}"};function vi(t,e){ke(t,lH);let n=N(e,"hidden",3,!1),r=N(e,"orientation",3,"horizontal"),i=ot(e,["$$slots","$$events","$$legacy","class","hidden","orientation"]);var o=sH();mt(o,()=>({...i,role:"separator",class:`sui divider ${e.class??""}`,hidden:n(),"aria-hidden":n(),"aria-orientation":r()}),void 0,void 0,void 0,"svelte-o0tys8"),S(t,o)}var cH=j("<div></div>");const uH={hash:"svelte-10dh5y9",code:".spacer.flex.svelte-10dh5y9 {flex:auto;}.spacer.svelte-10dh5y9:not(.flex) {width:8px;height:8px;}"};function _i(t,e){ke(t,uH);let n=N(e,"flex",3,!1),r=ot(e,["$$slots","$$events","$$legacy","class","flex"]);var i=cH();mt(i,()=>({...r,role:"none",class:`sui spacer ${e.class??""}`,[Nr]:{flex:n()}}),void 0,void 0,void 0,"svelte-10dh5y9"),S(t,i)}lc(["click"]);var dH=j('<div><div role="none" class="inner svelte-1jhg1vy"><!></div></div>');const fH={hash:"svelte-1jhg1vy",code:`.checkbox-group.svelte-1jhg1vy {display:inline-flex;}.checkbox-group.horizontal.svelte-1jhg1vy {gap:8px;align-items:center;flex-wrap:wrap;}.checkbox-group.vertical.svelte-1jhg1vy {gap:4px;flex-direction:column;}
|
|
351
|
+
@media (pointer: coarse) {.checkbox-group.vertical.svelte-1jhg1vy {gap:8px;}
|
|
352
|
+
}.inner.svelte-1jhg1vy {display:contents;}`};function hH(t,e){ke(t,fH);let n=N(e,"hidden",3,!1),r=N(e,"disabled",3,!1),i=N(e,"orientation",3,"horizontal"),o=ot(e,["$$slots","$$events","$$legacy","class","hidden","disabled","orientation","children"]);var a=dH();mt(a,()=>({...o,role:"group",class:`sui checkbox-group ${e.class??""} ${i()??""}`,hidden:n(),"aria-hidden":n(),"aria-disabled":r(),"aria-roledescription":"checkbox group"}),void 0,void 0,void 0,"svelte-1jhg1vy");var s=F(a),l=F(s);Ue(l,()=>e.children??He),Z(()=>s.inert=r()),S(t,a)}var pH=j('<label class="svelte-1r6dbqo"><!></label>'),gH=j('<div role="none"><div role="none" class="inner svelte-1r6dbqo"><!> <!></div></div>');const mH={hash:"svelte-1r6dbqo",code:".checkbox.svelte-1r6dbqo {display:inline-flex;align-items:center;gap:8px;margin:var(--sui-focus-ring-width);color:var(--sui-control-foreground-color);font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);cursor:pointer;-webkit-user-select:none;user-select:none;}.checkbox.svelte-1r6dbqo:hover button {background-color:var(--sui-hover-background-color);}.checkbox.svelte-1r6dbqo:hover button[aria-checked=true] {background-color:var(--sui-primary-accent-color-light);}.checkbox.svelte-1r6dbqo:active button {background-color:var(--sui-active-background-color);}.checkbox.svelte-1r6dbqo:active button[aria-checked=true] {background-color:var(--sui-primary-accent-color-dark);}.checkbox.svelte-1r6dbqo button {flex:none;align-items:center;justify-content:center;overflow:hidden;margin:0 !important;border-width:var(--sui-checkbox-border-width, 1.5px);border-color:var(--sui-checkbox-border-color);border-radius:var(--sui-checkbox-border-radius);padding:0;width:var(--sui-checkbox-height);height:var(--sui-checkbox-height);color:var(--sui-primary-accent-text-color);background-color:var(--sui-checkbox-background-color);transition:all 200ms;}.checkbox.svelte-1r6dbqo button[aria-checked=true] {border-color:var(--sui-checkbox-border-color-checked, var(--sui-primary-accent-color));color:var(--sui-checkbox-foreground-color-checked, var(--sui-primary-accent-color-inverted));background-color:var(--sui-checkbox-background-color-checked, var(--sui-primary-accent-color));}.checkbox.svelte-1r6dbqo button[aria-invalid=true] {border-color:var(--sui-error-border-color);color:var(--sui-error-foreground-color);}.checkbox.svelte-1r6dbqo button[aria-checked=true][aria-invalid=true] {background-color:var(--sui-checkbox-background-color);}.checkbox.svelte-1r6dbqo button .icon {font-size:calc(var(--sui-checkbox-height) - 2px);}.checkbox.svelte-1r6dbqo label:where(.svelte-1r6dbqo) {cursor:inherit;}.inner.svelte-1r6dbqo {display:contents;}"};function Bh(t,e){const n=Jn();ae(e,!0),ke(t,mH);let r=N(e,"checked",15),i=N(e,"name",3,void 0),o=N(e,"value",3,void 0),a=N(e,"hidden",3,!1),s=N(e,"disabled",3,!1),l=N(e,"readonly",3,!1),u=N(e,"required",3,!1),d=N(e,"invalid",3,!1),f=N(e,"label",3,void 0),h=N(e,"group",15),p=ot(e,["$$slots","$$events","$$legacy","checked","class","name","value","hidden","disabled","readonly","required","invalid","label","aria-label","group","onChange","children","checkIcon"]),g=ie(void 0);const m=_(()=>r()==="mixed");ze(()=>{Array.isArray(h())&&(h().includes(o())?r()!==!0&&r(!0):r()!==!1&&r(!1))});var v=gH();let b;v.__click=$=>{$.preventDefault(),$.stopPropagation(),$.target.matches("button")||c(g)?.click()};var y=F(v),w=F(y);{const $=T=>{var C=X(),P=M(C);{var O=L=>{var D=X(),B=M(D);Ue(B,()=>e.checkIcon),S(L,D)},I=L=>{var D=X(),B=M(D);{var K=W=>{Qe(W,{name:"remove"})},G=W=>{var Y=X(),R=M(Y);{var q=J=>{Qe(J,{name:"check"})};U(R,J=>{r()&&J(q)},!0)}S(W,Y)};U(B,W=>{c(m)?W(K):W(G,!1)},!0)}S(L,D)};U(P,L=>{e.checkIcon?L(O):L(I,!1)})}S(T,C)};let A=_(()=>e["aria-label"]||void 0),k=_(()=>e["aria-label"]?void 0:`${n}-label`);et(w,Qt(()=>p,{role:"checkbox",get id(){return n},get name(){return i()},get value(){return o()},get hidden(){return a()},get disabled(){return s()},get readonly(){return l()},get required(){return u()},get"aria-invalid"(){return d()},get"aria-checked"(){return r()},get"aria-label"(){return c(A)},get"aria-labelledby"(){return c(k)},onclick:T=>{T.preventDefault(),T.stopPropagation(),!(s()||l())&&(r(c(m)?!0:!r()),Array.isArray(h())&&(r()?h().includes(o())||h([...h(),o()]):h().includes(o())&&h(h().filter(C=>C!==o()))),e.onChange?.(new CustomEvent("Change",{detail:{checked:r()}})))},get element(){return c(g)},set element(T){V(g,T,!0)},startIcon:$,$$slots:{startIcon:!0}}))}var x=z(w,2);{var E=$=>{var A=pH(),k=F(A);{var T=P=>{var O=X(),I=M(O);Ue(I,()=>e.children),S(P,O)},C=P=>{var O=Fe();Z(()=>ne(O,f())),S(P,O)};U(k,P=>{e.children?P(T):P(C,!1)})}Z(()=>Se(A,"id",`${n}-label`)),S($,A)};U(x,$=>{(e.children||f())&&$(E)})}Z(()=>{b=hn(v,1,`sui checkbox ${e.class??""}`,"svelte-1r6dbqo",b,{checked:r(),indeterminate:c(m),disabled:s(),readonly:l()}),Se(v,"hidden",a()),y.inert=s()}),S(t,v),se()}lc(["click"]);var vH=j('<div role="none" class="title svelte-1w33w3m"> </div> <!> <!> <!>',1),_H=j('<div role="none" class="header svelte-1w33w3m"><!></div>'),bH=j("<!> <!> <!> <!>",1),yH=j('<div role="none" class="footer svelte-1w33w3m"><!></div>'),wH=j('<div role="none"><!> <div role="none" class="body svelte-1w33w3m"><!></div> <!></div>');const xH={hash:"svelte-1w33w3m",code:`.content.svelte-1w33w3m {position:relative;display:flex;flex-direction:column;overflow:hidden;border-radius:var(--sui-dialog-content-border-radius, 4px);max-width:calc(100dvw - var(--sui-dialog-content-margin, 16px) * 2);background-color:var(--sui-dialog-content-background-color, var(--sui-secondary-background-color-translucent));box-shadow:var(--sui-dialog-content-box-shadow, 0 8px 16px var(--sui-popup-shadow-color));-webkit-backdrop-filter:var(--sui-dialog-content-backdrop-filter, blur(16px));backdrop-filter:var(--sui-dialog-content-backdrop-filter, blur(16px));transition-property:transform;}dialog.open .content.svelte-1w33w3m {transition-duration:150ms;transform:scale(100%);}dialog:not(.open) .content.svelte-1w33w3m {transition-duration:300ms;transform:scale(90%);}.content.small.svelte-1w33w3m {width:var(--sui-dialog-small-content-width, var(--sui-dialog-content-width, 400px));max-height:var(--sui-dialog-small-content-max-height, var(--sui-dialog-content-max-height, 400px));}
|
|
353
|
+
@media (max-height: 400px) {.content.small.svelte-1w33w3m {max-height:calc(100dvh - 32px);}
|
|
354
|
+
}.content.medium.svelte-1w33w3m {width:var(--sui-dialog-medium-content-width, var(--sui-dialog-content-width, 600px));max-height:var(--sui-dialog-medium-content-max-height, var(--sui-dialog-content-max-height, 600px));}
|
|
355
|
+
@media (max-height: 600px) {.content.medium.svelte-1w33w3m {max-height:calc(100dvh - 32px);}
|
|
356
|
+
}.content.large.svelte-1w33w3m {width:var(--sui-dialog-large-content-width, var(--sui-dialog-content-width, 800px));max-height:var(--sui-dialog-large-content-max-height, var(--sui-dialog-content-max-height, 800px));}
|
|
357
|
+
@media (max-height: 800px) {.content.large.svelte-1w33w3m {max-height:calc(100dvh - 32px);}
|
|
358
|
+
}.content.x-large.svelte-1w33w3m {width:var(--sui-dialog-x-large-content-width, var(--sui-dialog-content-width, 1000px));max-height:var(--sui-dialog-x-large-content-max-height, var(--sui-dialog-content-max-height, 1000px));}
|
|
359
|
+
@media (max-height: 1000px) {.content.x-large.svelte-1w33w3m {max-height:calc(100dvh - 32px);}
|
|
360
|
+
}:is(.header.svelte-1w33w3m, .footer.svelte-1w33w3m) {display:flex;align-items:center;gap:4px;}.header.svelte-1w33w3m {box-sizing:content-box;margin:var(--sui-dialog-header-margin, 0 16px);border-width:var(--sui-dialog-header-border-width, 0 0 1px);border-color:var(--sui-dialog-header-border-color, var(--sui-secondary-border-color));padding:var(--sui-dialog-header-padding, 16px 8px);height:var(--sui-dialog-header-height, 32px);}.header.svelte-1w33w3m .title:where(.svelte-1w33w3m) {font-size:var(--sui-font-size-large);font-weight:var(--sui-font-weight-bold);}.footer.svelte-1w33w3m {margin:var(--sui-dialog-footer-margin, 0 24px 24px);}
|
|
361
|
+
@media (width < 768px) {.footer.svelte-1w33w3m {margin:var(--sui-dialog-footer-margin, 0 16px 16px);}
|
|
362
|
+
}.body.svelte-1w33w3m {overflow:auto;margin:var(--sui-dialog-body-margin, 24px 24px);white-space:normal;line-height:var(--sui-line-height-compact);}
|
|
363
|
+
@media (width < 768px) {.body.svelte-1w33w3m {margin:var(--sui-dialog-body-margin, 16px 16px);}
|
|
364
|
+
}`};function xo(t,e){const n=Jn();ae(e,!0),ke(t,xH);const r=()=>H(ce,"$_",i),[i,o]=ve();let a=N(e,"open",15,!1);N(e,"value",11,"");let s=N(e,"role",3,"dialog"),l=N(e,"size",3,"medium"),u=N(e,"showClose",3,!1),d=N(e,"showOk",3,!0),f=N(e,"showCancel",3,!0),h=N(e,"okLabel",3,""),p=N(e,"okShortcuts",3,void 0),g=N(e,"okDisabled",3,!1),m=N(e,"cancelLabel",3,""),v=N(e,"cancelShortcuts",3,void 0),b=N(e,"cancelDisabled",3,!1),y=N(e,"focusInput",3,!0),w=ot(e,["$$slots","$$events","$$legacy","open","value","title","role","size","class","showClose","showOk","showCancel","okLabel","okShortcuts","okDisabled","cancelLabel","cancelShortcuts","cancelDisabled","focusInput","children","header","headerExtra","footer","footerExtra","closeIcon","input"]),x=ie(void 0),E=ie(void 0);ze(()=>{a()&&c(E)&&(async()=>(await Rt(50),y()?(c(E)?.querySelector("input, button.primary")?.focus(),c(E)?.querySelector("input")?.select()):c(x)?.focus()))()});{let $=_(()=>e.header?void 0:e.title),A=_(()=>e.header?e.title:`${n}-title`);St(uL(t,Qt(()=>w,{get role(){return s()},get id(){return n},class:"dialog",get"aria-label"(){return c($)},get"aria-labelledby"(){return c(A)},get"aria-describedby"(){return`${n}-body`},showBackdrop:!0,get open(){return a()},set open(k){a(k)},children:(k,T)=>{var C=wH(),P=F(C);{var O=K=>{var G=_H(),W=F(G);{var Y=q=>{var J=X(),Q=M(J);Ue(Q,()=>e.header),S(q,J)},R=q=>{var J=vH(),Q=M(J),ee=F(Q),re=z(Q,2);_i(re,{flex:!0});var te=z(re,2);Ue(te,()=>e.headerExtra??He);var de=z(te,2);{var he=ue=>{{const ge=me=>{var Ae=X(),Ce=M(Ae);{var _e=be=>{var Oe=X(),je=M(Oe);Ue(je,()=>e.closeIcon),S(be,Oe)},fe=be=>{Qe(be,{name:"close"})};U(Ce,be=>{e.closeIcon?be(_e):be(fe,!1)})}S(me,Ae)};let ye=_(()=>r()("_sui.close"));et(ue,{variant:"ghost",iconic:!0,get"aria-label"(){return c(ye)},get"aria-controls"(){return n},onclick:()=>{c(x)?.close("close")},startIcon:ge,$$slots:{startIcon:!0}})}};U(de,ue=>{u()&&ue(he)})}Z(()=>{Se(Q,"id",`${n}-title`),ne(ee,e.title)}),S(q,J)};U(W,q=>{e.header?q(Y):q(R,!1)})}S(K,G)};U(P,K=>{(e.title||u()||e.header||e.headerExtra)&&K(O)})}var I=z(P,2),L=F(I);Ue(L,()=>e.children??He);var D=z(I,2);{var B=K=>{var G=yH(),W=F(G);{var Y=q=>{var J=X(),Q=M(J);Ue(Q,()=>e.footer??He),S(q,J)},R=q=>{var J=bH(),Q=M(J);Ue(Q,()=>e.footerExtra??He);var ee=z(Q,2);_i(ee,{flex:!0});var re=z(ee,2);{var te=ue=>{{let ge=_(()=>h()||r()("_sui.ok"));et(ue,{variant:"primary",get label(){return c(ge)},get keyShortcuts(){return p()},get disabled(){return g()},onclick:()=>{c(x)?.close("ok")}})}};U(re,ue=>{d()&&ue(te)})}var de=z(re,2);{var he=ue=>{{let ge=_(()=>m()||r()("_sui.cancel"));et(ue,{variant:"secondary",get label(){return c(ge)},get keyShortcuts(){return v()},get disabled(){return b()},onclick:()=>{c(x)?.close("cancel")}})}};U(de,ue=>{f()&&ue(he)})}S(q,J)};U(W,q=>{e.footer?q(Y):q(R,!1)})}S(K,G)};U(D,K=>{(d()||f()||e.footer||e.footerExtra)&&K(B)})}St(C,K=>V(E,K),()=>c(E)),Z(()=>{hn(C,1,`content ${e.class??""} ${l()??""}`,"svelte-1w33w3m"),Se(I,"id",`${n}-body`)}),S(k,C)},$$slots:{default:!0}})),k=>V(x,k,!0),()=>c(x))}se(),o()}function Zm(t,e){ae(e,!0);let n=N(e,"open",15,!1),r=ot(e,["$$slots","$$events","$$legacy","open"]);xo(t,Qt(()=>r,{role:"alertdialog",showCancel:!1,get open(){return n()},set open(i){n(i)}})),se()}function md(t,e){ae(e,!0);let n=N(e,"open",15,!1),r=ot(e,["$$slots","$$events","$$legacy","open"]);xo(t,Qt(()=>r,{role:"alertdialog",get open(){return n()},set open(i){n(i)}})),se()}var kH=j('<span aria-hidden="true"><!></span>'),SH=j('<div role="none"><input/> <!></div>');const EH={hash:"svelte-yprrie",code:`.text-input.svelte-yprrie {display:inline-flex;align-items:center;position:relative;margin:var(--sui-focus-ring-width);min-width:var(--sui-textbox-singleline-min-width);}.text-input.flex.svelte-yprrie {width:-moz-available;width:-webkit-fill-available;width:stretch;min-width:0;}.text-input.monospace.svelte-yprrie {--sui-textbox-font-family: var(--sui-font-family-monospace, monospace);}input.svelte-yprrie:is(:where(.svelte-yprrie):-webkit-autofill, :where(.svelte-yprrie):-webkit-autofill:focus) {transition:background-color 0s 600000s, color 0s 600000s;}input.svelte-yprrie {display:inline-block;flex:auto;border-width:var(--sui-textbox-border-width, 1px);border-color:var(--sui-textbox-border-color);border-radius:var(--sui-textbox-border-radius);padding:var(--sui-textbox-singleline-padding);min-width:0;height:var(--sui-textbox-height);color:var(--sui-textbox-foreground-color);background-color:var(--sui-textbox-background-color);font-family:var(--sui-textbox-font-family);font-size:var(--sui-textbox-font-size);line-height:var(--sui-textbox-singleline-line-height);font-weight:var(--sui-textbox-font-weight, var(--sui-font-weight-normal, normal));text-align:var(--sui-textbox-text-align, start);text-indent:var(--sui-textbox-text-indent, 0);text-transform:var(--sui-textbox-text-transform, none);letter-spacing:var(--sui-textbox-letter-spacing, normal);word-spacing:var(--sui-word-spacing-normal, normal);transition:all 200ms;}input.svelte-yprrie:focus {border-color:var(--sui-textbox-border-color-focus, var(--sui-primary-accent-color));color:var(--sui-textbox-foreground-color-focus, var(--sui-textbox-foreground-color));background-color:var(--sui-textbox-background-color-focus, var(--sui-textbox-background-color));}input.svelte-yprrie:read-only {color:var(--sui-tertiary-foreground-color);border-color:var(--sui-textbox-border-color) !important;}input.svelte-yprrie:is(:where(.svelte-yprrie):disabled, :where(.svelte-yprrie):read-only) {background-color:var(--sui-disabled-background-color);}input[aria-invalid=true].svelte-yprrie {border-color:var(--sui-error-border-color);}input.svelte-yprrie ~ button {flex:none;margin-inline-start:-1px;border-width:1px;border-color:var(--sui-textbox-border-color);height:var(--sui-textbox-height);aspect-ratio:1/1;}input.svelte-yprrie ~ button:last-child {border-start-start-radius:0;border-start-end-radius:4px;border-end-end-radius:4px;border-end-start-radius:0;}input.svelte-yprrie ~ button .icon {font-size:var(--sui-font-size-xx-large);}.label.svelte-yprrie {position:absolute;inset:var(--sui-textbox-singleline-padding);z-index:2;display:flex;align-items:center;justify-content:var(--sui-textbox-placeholder-text-align, var(--sui-textbox-text-align, start));pointer-events:none;}.label.hidden.svelte-yprrie {opacity:0;}input.svelte-yprrie:focus + .label:where(.svelte-yprrie) {opacity:0;}input.svelte-yprrie::placeholder,
|
|
365
|
+
.label.svelte-yprrie {color:var(--sui-textbox-placeholder-foreground-color, var(--sui-textbox-foreground-color));opacity:var(--sui-textbox-placeholder-opacity, 0.5);font-family:var(--sui-textbox-placeholder-font-family, var(--sui-textbox-font-family));font-size:var(--sui-textbox-placeholder-font-size, var(--sui-textbox-font-size));line-height:var(--sui-textbox-placeholder-singleline-line-height, var(--sui-textbox-singleline-line-height));font-weight:var(--sui-textbox-placeholder-font-weight, var(--sui-textbox-font-weight, var(--sui-font-weight-normal, normal)));text-align:var(--sui-textbox-placeholder-text-align, var(--sui-textbox-text-align, start));text-indent:var(--sui-textbox-placeholder-text-indent, var(--sui-textbox-text-indent, 0));letter-spacing:var(--sui-textbox-placeholder-letter-spacing, var(--sui-textbox-letter-spacing, normal));}`};function Yn(t,e){const n=Jn();ae(e,!0),ke(t,EH);let r=N(e,"value",15),i=N(e,"element",15),o=N(e,"role",3,"textbox"),a=N(e,"keyShortcuts",3,void 0),s=N(e,"name",3,void 0),l=N(e,"showInlineLabel",3,!1),u=N(e,"inputmode",3,"text"),d=N(e,"flex",3,!1),f=N(e,"monospace",3,!1),h=N(e,"hidden",3,!1),p=N(e,"disabled",3,!1),g=N(e,"readonly",3,!1),m=N(e,"required",3,!1),v=N(e,"invalid",3,!1),b=ot(e,["$$slots","$$events","$$legacy","value","element","role","keyShortcuts","name","showInlineLabel","inputmode","flex","monospace","class","hidden","disabled","readonly","required","invalid","aria-label","children"]);var y=SH();let w;var x=F(y);mt(x,()=>({...b,type:"text",role:o(),dir:"auto",name:s()||void 0,tabindex:p()?-1:0,disabled:p()||void 0,readonly:g()||void 0,inputmode:u(),"aria-label":e["aria-label"],"aria-hidden":h(),"aria-disabled":p(),"aria-readonly":g(),"aria-required":m(),"aria-invalid":v()}),void 0,void 0,void 0,"svelte-yprrie",!0),St(x,A=>i(A),()=>i()),Hu(()=>pm(x,r)),Vs(x,(A,k)=>cL?.(A,k),a);var E=z(x,2);{var $=A=>{var k=kH();let T;var C=F(k);Ur(C,{children:(P,O)=>{var I=Fe();Z(()=>ne(I,e["aria-label"])),S(P,I)},$$slots:{default:!0}}),Z(()=>{Se(k,"id",`${n}-label`),T=hn(k,1,"label svelte-yprrie",null,T,{hidden:!!r()})}),S(A,k)};U(E,A=>{e["aria-label"]&&l()&&A($)})}Z(()=>{w=hn(y,1,`sui text-input ${e.class??""}`,"svelte-yprrie",w,{flex:d(),monospace:f(),disabled:p(),readonly:g()}),Se(y,"hidden",h()),x.dir=x.dir}),S(t,y),se()}var TH=j('<!> <div class="input-outer svelte-1oqxsu1"><!></div>',1);const $H={hash:"svelte-1oqxsu1",code:".input-outer.svelte-1oqxsu1 {margin:12px 0 0;}"};function pL(t,e){ae(e,!0),ke(t,$H);let n=N(e,"open",15,!1),r=N(e,"value",15,""),i=N(e,"textboxAttrs",19,()=>({})),o=ot(e,["$$slots","$$events","$$legacy","open","value","textboxAttrs","children","input","onkeydown","onkeyup","onkeypress","oninput"]);xo(t,Qt(()=>o,{role:"alertdialog",get open(){return n()},set open(a){n(a)},children:(a,s)=>{var l=TH(),u=M(l);Ue(u,()=>e.children??He);var d=z(u,2),f=F(d);{var h=g=>{var m=X(),v=M(m);Ue(v,()=>e.input),S(g,m)},p=g=>{Yn(g,Qt({flex:!0,autofocus:!0},i,{get onkeydown(){return e.onkeydown},get onkeyup(){return e.onkeyup},get onkeypress(){return e.onkeypress},get oninput(){return e.oninput},get value(){return r()},set value(m){r(m)}}))};U(f,g=>{e.input?g(h):g(p,!1)})}S(a,l)},$$slots:{default:!0}})),se()}var AH=j('<input class="sui file-picker" type="file" hidden=""/>');function y0(t,e){ae(e,!0);let n=N(e,"accept",3,void 0),r=N(e,"multiple",3,!1),i=N(e,"onSelect",3,void 0),o=N(e,"onCancel",3,void 0),a=ie(void 0);var l={open:()=>{c(a)?.click()}},u=AH();return u.__change=({target:d})=>{const f=[...d.files];i()?.({files:f,file:f[0]})},St(u,d=>V(a,d),()=>c(a)),Z(()=>{Se(u,"accept",n()),u.multiple=r()}),ui("cancel",u,d=>{d.stopPropagation(),o()?.()}),S(t,u),se(l)}lc(["change"]);var CH=j('<div role="row" class="row-group-caption svelte-1ibnuuz"><!></div>'),PH=j("<div><!> <!></div>");const OH={hash:"svelte-1ibnuuz",code:"[role=rowgroup].svelte-1ibnuuz {display:table-row-group;}[role=row].svelte-1ibnuuz {display:table-row;}[role=columnheader].svelte-1ibnuuz {display:table-cell;padding:8px;color:var(--sui-secondary-foreground-color);background-color:var(--sui-secondary-background-color);font-size:var(--sui-font-size-default);text-align:start;}"};function gL(t,e){const n=Jn();ke(t,OH);let r=N(e,"label",3,""),i=ot(e,["$$slots","$$events","$$legacy","class","label","children"]);var o=PH();mt(o,()=>({...i,role:"rowgroup",class:`sui grid-body row-group ${e.class??""}`,"aria-labelledby":r()?`${n}-label`:void 0,"aria-roledescription":"grid body"}),void 0,void 0,void 0,"svelte-1ibnuuz");var a=F(o);{var s=u=>{var d=CH(),f=F(d);jD(f,()=>"th",!1,(h,p)=>{mt(h,()=>({role:"columnheader",id:`${n}-label`,colspan:"9999",class:""}),void 0,void 0,void 0,"svelte-1ibnuuz");var g=Fe();Z(()=>ne(g,r())),S(p,g)}),S(u,d)};U(a,u=>{r()&&u(s)})}var l=z(a,2);Ue(l,()=>e.children??He),S(t,o)}var LH=j("<div><!></div>");const IH={hash:"svelte-1ihv6vr",code:".grid-cell.svelte-1ihv6vr {display:table-cell;}"};function Wi(t,e){ke(t,IH);let n=ot(e,["$$slots","$$events","$$legacy","class","children"]);var r=LH();mt(r,()=>({...n,role:"gridcell",class:`sui grid-cell ${e.class??""}`}),void 0,void 0,void 0,"svelte-1ihv6vr");var i=F(r);Ue(i,()=>e.children??He),S(t,r)}var NH=j("<div><!></div>");const RH={hash:"svelte-1sumf73",code:".grid-row.svelte-1sumf73 {display:table-row;height:var(--sui-primary-row-height);}"};function qh(t,e){ke(t,RH);let n=N(e,"selected",3,!1),r=ot(e,["$$slots","$$events","$$legacy","class","selected","children"]);var i=NH();mt(i,()=>({...r,role:"row",class:`sui grid-row ${e.class??""}`,tabindex:"0","aria-selected":n()}),void 0,void 0,void 0,"svelte-1sumf73");var o=F(i);Ue(o,()=>e.children??He),S(t,i)}var MH=j("<div><!></div>");const DH={hash:"svelte-hoaifu",code:".grid.svelte-hoaifu {display:table;margin:var(--sui-focus-ring-width);width:calc(100% - var(--sui-focus-ring-width) * 2);}.grid.data.svelte-hoaifu {border-collapse:collapse;}.grid.data.svelte-hoaifu :is(.grid-col-header, .grid-row-header, .grid-cell) {border:1px solid var(--sui-secondary-border-color);padding:8px 8px;}"};function FH(t,e){ae(e,!0),ke(t,DH);let n=N(e,"element",15),r=N(e,"multiple",3,!1),i=N(e,"clickToSelect",3,!0),o=ot(e,["$$slots","$$events","$$legacy","element","class","multiple","clickToSelect","children","onChange"]);var a=MH(),s=u=>{e.onChange?.(u)};mt(a,()=>({...o,role:"grid",class:`sui grid ${e.class??""}`,"aria-multiselectable":r(),onChange:s}),void 0,void 0,void 0,"svelte-hoaifu");var l=F(a);Ue(l,()=>e.children??He),St(a,u=>n(u),()=>n()),Vs(a,(u,d)=>gd?.(u,d),()=>({clickToSelect:i()})),S(t,a),se()}var zH=j('<div><div role="none" class="inner svelte-enx570"><!></div></div>');const jH={hash:"svelte-enx570",code:`[role=listbox].svelte-enx570 {display:flex;flex-direction:column;margin:var(--sui-focus-ring-width);border-width:var(--sui-listbox-border-width, 1px);border-style:var(--sui-listbox-border-style, solid);border-color:var(--sui-listbox-border-width, var(--sui-secondary-border-color));border-radius:var(--sui-listbox-border-radius, 4px);padding:var(--sui-listbox-padding, 4px);min-width:var(--sui-listbox-min-width, calc(var(--sui-option-height) * 5));color:var(--sui-listbox-foreground-color);background-color:var(--sui-listbox-background-color);font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);}
|
|
366
|
+
@media (pointer: coarse) {[role=listbox].svelte-enx570 {gap:8px 0;}
|
|
367
|
+
}[role=listbox].svelte-enx570 [role=separator] {margin:4px 0;background-color:var(--sui-control-border-color);}[role=listbox][aria-invalid=true].svelte-enx570 {border-color:var(--sui-error-border-color);}[role=listbox].tabs.svelte-enx570 {padding:0;border-block-start-width:0;border-block-end-width:0;border-inline-end-width:1px;border-inline-start-width:0;border-color:var(--sui-control-border-color);}[role=listbox].tabs.svelte-enx570 .option button {justify-content:flex-start;border-width:0;border-inline-end-width:2px;border-color:transparent;padding:0 12px;border-start-end-radius:0;border-end-end-radius:0;height:var(--sui-tab-medium-height);}[role=listbox].tabs.svelte-enx570 .option button[aria-selected=true] {border-color:var(--sui-primary-accent-color-light);}[role=listbox].tabs.svelte-enx570 .option button .icon {display:none;}[role=listbox].in-combobox.svelte-enx570:focus-visible {outline-color:transparent;}[role=listbox].filtered.svelte-enx570 [role=separator] {display:none;}.inner.svelte-enx570 {display:contents;}`};function vd(t,e){ae(e,!0),ke(t,jH);let n=N(e,"hidden",3,!1),r=N(e,"disabled",3,!1),i=N(e,"readonly",3,!1),o=N(e,"required",3,!1),a=N(e,"invalid",3,!1),s=N(e,"multiple",3,!1),l=N(e,"searchTerms",3,""),u=ot(e,["$$slots","$$events","$$legacy","class","hidden","disabled","readonly","required","invalid","multiple","searchTerms","children","onFilter"]),d=ie(!1);var f=zH(),h=m=>{const{detail:{matched:v,total:b}}=m;V(d,v!==b),e.onFilter?.(m)};mt(f,()=>({...u,role:"listbox",class:`sui listbox ${e.class??""}`,tabindex:r()?-1:0,hidden:n(),"aria-hidden":n(),"aria-disabled":r(),"aria-readonly":i(),"aria-required":o(),"aria-invalid":a(),"aria-multiselectable":s(),onFilter:h,[Nr]:{filtered:c(d)}}),void 0,void 0,void 0,"svelte-enx570");var p=F(f),g=F(p);Ue(g,()=>e.children??He),Vs(f,(m,v)=>gd?.(m,v),()=>({searchTerms:l()})),Z(()=>p.inert=r()),S(t,f),se()}var UH=j('<div><div role="none" class="label svelte-1417s2s"><!></div> <div role="none" class="inner svelte-1417s2s"><!></div></div>');const BH={hash:"svelte-1417s2s",code:".option-group.svelte-1417s2s:not(:first-child) {margin:12px 0 0;}.label.svelte-1417s2s {margin:8px;color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);}.inner.svelte-1417s2s {display:contents;}"};function Tl(t,e){const n=Jn();ke(t,BH);let r=N(e,"hidden",3,!1),i=N(e,"disabled",3,!1),o=N(e,"label",3,""),a=ot(e,["$$slots","$$events","$$legacy","class","hidden","disabled","label","children"]);var s=UH();mt(s,()=>({...a,role:"group",id:n,class:`sui option-group ${e.class??""}`,hidden:r(),"aria-hidden":r(),"aria-disabled":i(),"aria-labelledby":`${n}-label`,"aria-roledescription":"option group"}),void 0,void 0,void 0,"svelte-1417s2s");var l=F(s),u=F(l);Ur(u,{children:(h,p)=>{var g=Fe();Z(()=>ne(g,o())),S(h,g)},$$slots:{default:!0}});var d=z(l,2),f=F(d);Ue(f,()=>e.children??He),Z(()=>{Se(l,"id",`${n}-label`),d.inert=i()}),S(t,s)}var qH=j("<!> <!>",1),HH=j('<div role="none"><!></div>');const KH={hash:"svelte-1y01doy",code:".option.svelte-1y01doy {display:contents;}.option.svelte-1y01doy:focus-visible {outline-width:0 !important;}.option.svelte-1y01doy .wrap button {white-space:normal;}.option.svelte-1y01doy button {flex:none;display:flex;gap:4px;margin:0 !important;border-radius:var(--sui-option-border-radius);padding:var(--sui-option-padding);width:100%;height:auto;min-height:var(--sui-option-height);}.option.svelte-1y01doy button:active {background-color:var(--sui-active-background-color);}.option.svelte-1y01doy button[aria-selected=true] .icon.check {color:var(--sui-primary-accent-color-text);}.option.svelte-1y01doy button * {flex:none;}.option.svelte-1y01doy button .label {flex:auto;}.option.svelte-1y01doy :is(.focused, button:hover) {color:var(--sui-highlight-foreground-color);background-color:var(--sui-hover-background-color);}.option.svelte-1y01doy .icon.check {margin:-2px;}"};function Mr(t,e){ae(e,!0),ke(t,KH);let n=N(e,"selected",15,!1),r=N(e,"hidden",15,!1),i=N(e,"disabled",3,!1),o=N(e,"value",19,()=>e.label),a=N(e,"searchValue",19,()=>e.label),s=N(e,"wrap",3,!1),l=ot(e,["$$slots","$$events","$$legacy","selected","hidden","class","disabled","label","value","searchValue","wrap","children","checkIcon","startIcon","onChange","onToggle"]);var u=HH();let d;var f=F(u);et(f,Qt(()=>l,{role:"option",tabindex:"-1",get"aria-selected"(){return n()},get label(){return e.label},get value(){return o()},get hidden(){return r()},get disabled(){return i()},get"data-search-value"(){return a()},onChange:p=>{n(p.detail.selected),e.onChange?.(p)},onToggle:p=>{r(p.detail.hidden),n(!1),e.onToggle?.(p)},startIcon:p=>{var g=X(),m=M(g);Ue(m,()=>e.startIcon??He),S(p,g)},children:(p,g)=>{var m=qH(),v=M(m);{var b=w=>{var x=X(),E=M(x);{var $=k=>{var T=X(),C=M(T);Ue(C,()=>e.checkIcon),S(k,T)},A=k=>{Qe(k,{class:"check",name:"check"})};U(E,k=>{e.checkIcon?k($):k(A,!1)})}S(w,x)};U(v,w=>{n()&&w(b)})}var y=z(v,2);Ue(y,()=>e.children??He),S(p,m)},$$slots:{startIcon:!0,default:!0}})),Z(()=>{d=hn(u,1,`sui option ${e.class??""}`,"svelte-1y01doy",d,{wrap:s()}),Se(u,"hidden",r())}),S(t,u),se()}var VH=j("<div><!></div>");const GH={hash:"svelte-f4exu0",code:`.menu.svelte-f4exu0 {display:flex;flex-direction:column;margin:0;border-width:var(--sui-menu-border-width, 1px);border-style:var(--sui-menu-border-style, solid);border-color:var(--sui-menu-border-width, var(--sui-secondary-border-color));border-radius:var(--sui-menu-border-radius, 4px);padding:var(--sui-menu-padding, 4px);}
|
|
368
|
+
@media (pointer: coarse) {.menu.svelte-f4exu0 {gap:8px 0;}
|
|
369
|
+
}.menu.svelte-f4exu0 [role=separator] {margin:var(--sui-menu-divider-margin, 4px);background-color:var(--sui-menu-divider-color, var(--sui-control-border-color));}`};function xr(t,e){ae(e,!0),ke(t,GH);let n=N(e,"hidden",3,!1),r=N(e,"disabled",3,!1),i=ot(e,["$$slots","$$events","$$legacy","class","hidden","disabled","children","onChange"]);var o=VH(),a=l=>{e.onChange?.(l)};mt(o,()=>({...i,role:"menu",class:`sui menu ${e.class??""}`,hidden:n(),"aria-hidden":n(),"aria-disabled":r(),onChange:a}),void 0,void 0,void 0,"svelte-f4exu0");var s=F(o);Ue(s,()=>e.children??He),Vs(o,l=>gd?.(l)),S(t,o),se()}var WH=j('<span role="none" class="icon-outer svelte-16ka1nk"><!></span>'),YH=j('<div role="none"><!></div> <!>',1),JH=j('<div role="none"><!> <!></div>');const XH={hash:"svelte-16ka1nk",code:".menuitem.svelte-16ka1nk {position:relative;}.menuitem.svelte-16ka1nk button {display:flex;gap:var(--sui-menuitem-gap, 4px);align-items:var(--sui-menuitem-align-items, center);border-radius:var(--sui-menuitem-border-radius, var(--sui-option-border-radius, 4px));margin:0 !important;padding:var(--sui-menuitem-padding, 0 16px);width:100%;min-width:var(--sui-menuitem-min-width, 160px);height:var(--sui-menuitem-height, var(--sui-option-height));color:var(--sui-menuitem-foreground-color, var(--sui-control-foreground-color, inherit));background-color:var(--sui-menuitem-background-color, transparent);font-size:var(--sui-menuitem-font-size, var(--sui-option-font-size));font-weight:var(--sui-menuitem-font-weight, var(--sui-option-font-weight, var(--sui-font-weight-normal, normal)));}.menuitem.svelte-16ka1nk button[aria-checked=true] .icon {color:var(--sui-primary-accent-color-text);}.menuitem.svelte-16ka1nk button:hover {color:var(--sui-highlight-foreground-color);background-color:var(--sui-hover-background-color);}.menuitem.svelte-16ka1nk button:active {background-color:var(--sui-active-background-color);}.menuitem.svelte-16ka1nk :hover > [role=menu] {opacity:1;}.menuitem.svelte-16ka1nk > [role=menu] {position:absolute;inset-block-start:2px;inset-block-end:auto;inset-inline-start:calc(100% + 4px);inset-inline-end:auto;}.menuitem.svelte-16ka1nk > [role=menu]:hover {opacity:1;}.content.svelte-16ka1nk {flex:auto;}.icon-outer.svelte-16ka1nk {flex:none;width:24px;height:24px;}"};function vt(t,e){ae(e,!0),ke(t,XH);const n=()=>H(Gl,"$isRTL",r),[r,i]=ve();let o=N(e,"role",3,"menuitem"),a=N(e,"hidden",3,!1),s=N(e,"disabled",3,!1),l=N(e,"label",3,""),u=N(e,"popupPosition",3,"right-top"),d=ot(e,["$$slots","$$events","$$legacy","class","role","hidden","disabled","label","popupPosition","children","startIcon","endIcon","chevronIcon","items","onmouseenter","onmouseleave","onclick","onChange","onSelect"]),f=ie(!1),h=ie(!1),p=ie(void 0),g=ie(void 0);const m=_(()=>o()==="menuitem"&&!!e.items);Vt(()=>{V(g,c(p)?.closest("dialog")??void 0,!0)});var v=JH(),b=F(v);{const x=T=>{var C=X(),P=M(C);Ue(P,()=>e.startIcon??He),S(T,C)},E=T=>{var C=YH(),P=M(C);let O;var I=F(P);{var L=G=>{var W=Fe();Z(()=>ne(W,l())),S(G,W)},D=G=>{var W=X(),Y=M(W);Ue(Y,()=>e.children??He),S(G,W)};U(I,G=>{l()?G(L):G(D,!1)})}var B=z(P,2);{var K=G=>{var W=WH(),Y=F(W);{var R=J=>{var Q=X(),ee=M(Q);Ue(ee,()=>e.chevronIcon),S(J,Q)},q=J=>{{let Q=_(()=>n()?"chevron_left":"chevron_right");Qe(J,{get name(){return c(Q)}})}};U(Y,J=>{e.chevronIcon?J(R):J(q,!1)})}S(G,W)};U(B,G=>{c(m)&&G(K)})}Z(()=>O=hn(P,1,"content svelte-16ka1nk",null,O,{label:!!l()})),S(T,C)},$=T=>{var C=X(),P=M(C);Ue(P,()=>e.endIcon??He),S(T,C)};let A=_(()=>c(m)?"menu":void 0),k=_(()=>c(m)?c(f):void 0);et(b,Qt(()=>d,{get role(){return o()},get hidden(){return a()},get disabled(){return s()},get"aria-haspopup"(){return c(A)},get"aria-expanded"(){return c(k)},onmouseenter:T=>{c(m)&&window.setTimeout(()=>{V(f,!0)},200),e.onmouseenter?.(T)},onmouseleave:T=>{c(m)&&window.setTimeout(()=>{c(h)||V(f,!1)},200),e.onmouseleave?.(T)},onclick:T=>{c(m)&&(T.preventDefault(),T.stopPropagation(),V(f,!c(f))),e.onclick?.(T)},get onChange(){return e.onChange},get onSelect(){return e.onSelect},get element(){return c(p)},set element(T){V(p,T,!0)},startIcon:x,children:E,endIcon:$,$$slots:{startIcon:!0,default:!0,endIcon:!0}}))}var y=z(b,2);{var w=x=>{Ym(x,{get anchor(){return c(p)},get parentDialogElement(){return c(g)},get position(){return u()},get open(){return c(f)},set open(E){V(f,E,!0)},get hovered(){return c(h)},set hovered(E){V(h,E,!0)},children:(E,$)=>{xr(E,{children:(A,k)=>{var T=X(),C=M(T);Ue(C,()=>e.items??He),S(A,T)},$$slots:{default:!0}})},$$slots:{default:!0}})};U(y,x=>{c(m)&&c(p)&&c(g)&&x(w)})}Z(()=>{hn(v,1,`sui menuitem ${e.class??""}`,"svelte-16ka1nk"),Se(v,"hidden",a())}),S(t,v),se(),i()}function Lg(t,e){ae(e,!0);let n=N(e,"checked",15),r=N(e,"hidden",3,!1),i=N(e,"disabled",3,!1),o=N(e,"label",3,""),a=ot(e,["$$slots","$$events","$$legacy","checked","class","hidden","disabled","label","children","startIcon","onChange"]);vt(t,Qt(()=>a,{role:"menuitemcheckbox",get class(){return`sui menu-item-checkbox ${e.class??""}`},get label(){return o()},get hidden(){return r()},get disabled(){return i()},get"aria-checked"(){return n()},onChange:d=>{e.onChange?.(d),n(d.detail.checked)},startIcon:d=>{var f=X(),h=M(f);Ue(h,()=>e.startIcon??He),S(d,f)},children:d=>{var f=X(),h=M(f);Ue(h,()=>e.children??He),S(d,f)},endIcon:d=>{var f=X(),h=M(f);{var p=g=>{Qe(g,{name:"check"})};U(h,g=>{n()&&g(p)})}S(d,f)},$$slots:{startIcon:!0,default:!0,endIcon:!0}})),se()}function eh(t,e){ae(e,!0);let n=N(e,"checked",15),r=N(e,"hidden",3,!1),i=N(e,"disabled",3,!1),o=N(e,"label",3,""),a=ot(e,["$$slots","$$events","$$legacy","checked","class","hidden","disabled","label","children","startIcon","onChange"]);vt(t,Qt(()=>a,{role:"menuitemradio",get class(){return`sui menu-item-radio ${e.class??""}`},get label(){return o()},get hidden(){return r()},get disabled(){return i()},get"aria-checked"(){return n()},onChange:d=>{e.onChange?.(d),n(d.detail.checked)},startIcon:d=>{var f=X(),h=M(f);Ue(h,()=>e.startIcon??He),S(d,f)},children:d=>{var f=X(),h=M(f);Ue(h,()=>e.children??He),S(d,f)},endIcon:d=>{var f=X(),h=M(f);{var p=g=>{Qe(g,{name:"check"})};U(h,g=>{n()&&g(p)})}S(d,f)},$$slots:{startIcon:!0,default:!0,endIcon:!0}})),se()}var ZH=j('<div><div role="none" class="svelte-16nnfpo"></div></div>');const QH={hash:"svelte-16nnfpo",code:".progressbar.svelte-16nnfpo {overflow:hidden;border-width:var(--sui-progressbar-border-width, 1px);border-style:var(--sui-progressbar-border-style, solid);border-color:var(--sui-progressbar-border-color, var(--sui-control-border-color));border-radius:var(--sui-progressbar-border-radius, 16px);width:var(--sui-progressbar-width, 240px);height:var(--sui-progressbar-height, 10px);background-color:var(--sui-progressbar-background-color, var(--sui-secondary-background-color));}.progressbar.svelte-16nnfpo div:where(.svelte-16nnfpo) {height:100%;background-color:var(--sui-progressbar-foreground-color, var(--sui-primary-accent-color-light));transition:width 250ms;}"};function eK(t,e){ke(t,QH);let n=N(e,"now",3,0),r=N(e,"min",3,0),i=N(e,"max",3,100),o=ot(e,["$$slots","$$events","$$legacy","class","now","min","max","text"]);var a=ZH();mt(a,()=>({...o,role:"progressbar",class:`sui progressbar ${e.class??""}`,"aria-valuenow":n(),"aria-valuemin":r(),"aria-valuemax":i(),"aria-valuetext":e.text}),void 0,void 0,void 0,"svelte-16nnfpo");var s=F(a);let l;Z(()=>l=Co(s,"",l,{width:`${n()??""}%`})),S(t,a)}var tK=j('<div><div role="none" class="inner svelte-het74m"><!></div></div>');const nK={hash:"svelte-het74m",code:`.radio-group.svelte-het74m {display:inline-flex;}.radio-group.svelte-het74m:focus-visible {outline-width:0 !important;}.radio-group.horizontal.svelte-het74m {gap:8px;align-items:center;flex-wrap:wrap;}.radio-group.vertical.svelte-het74m {gap:4px;flex-direction:column;}
|
|
370
|
+
@media (pointer: coarse) {.radio-group.vertical.svelte-het74m {gap:8px;}
|
|
371
|
+
}.radio-group.svelte-het74m [aria-invalid=true] button {border-color:var(--sui-error-border-color);}.radio-group.svelte-het74m [aria-invalid=true] button[aria-checked=true] {border-color:var(--sui-error-border-color);}.radio-group.svelte-het74m [aria-invalid=true] button[aria-checked=true]::before {background-color:var(--sui-error-border-color);}.inner.svelte-het74m {display:contents;}`};function rK(t,e){ae(e,!0),ke(t,nK);let n=N(e,"hidden",3,!1),r=N(e,"disabled",3,!1),i=N(e,"readonly",3,!1),o=N(e,"required",3,!1),a=N(e,"invalid",3,!1),s=N(e,"orientation",3,"horizontal"),l=ot(e,["$$slots","$$events","$$legacy","class","hidden","disabled","readonly","required","invalid","orientation","children","onChange"]);var u=tK(),d=p=>{e.onChange?.(p)};mt(u,()=>({...l,role:"radiogroup",class:`sui radio-group ${e.class??""} ${s()??""}`,tabindex:"-1",hidden:n(),"aria-hidden":n(),"aria-disabled":r(),"aria-readonly":i(),"aria-required":o(),"aria-invalid":a(),"aria-orientation":s(),onChange:d}),void 0,void 0,void 0,"svelte-het74m");var f=F(u),h=F(f);Ue(h,()=>e.children??He),Vs(u,p=>gd?.(p)),Z(()=>f.inert=r()),S(t,u),se()}var iK=j('<label class="svelte-9pa8i8"><!></label>'),oK=j("<span><!> <!></span>");const aK={hash:"svelte-9pa8i8",code:'.radio.svelte-9pa8i8 {display:inline-flex;align-items:center;gap:8px;margin:var(--sui-focus-ring-width);color:var(--sui-control-foreground-color);font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);cursor:pointer;-webkit-user-select:none;user-select:none;}.radio.svelte-9pa8i8 :hover button {background-color:var(--sui-hover-background-color);}.radio.svelte-9pa8i8 :hover button[aria-checked=true] {border-color:var(--sui-primary-accent-color-light);color:var(--sui-primary-accent-color-text);}.radio.svelte-9pa8i8 :hover button[aria-checked=true]::before {background-color:var(--sui-primary-accent-color-light);}.radio.svelte-9pa8i8 :active button {background-color:var(--sui-active-background-color);}.radio.svelte-9pa8i8 :active button[aria-checked=true] {border-color:var(--sui-primary-accent-color-dark);color:var(--sui-primary-accent-color-dark);}.radio.svelte-9pa8i8 button {flex:none;justify-content:center;overflow:hidden;margin:0 !important;border-width:1.5px;border-color:var(--sui-checkbox-border-color);border-radius:var(--sui-checkbox-height);padding:0;width:var(--sui-checkbox-height);height:var(--sui-checkbox-height);background-color:var(--sui-checkbox-background-color);transition:all 200ms;}.radio.svelte-9pa8i8 button::before {content:"";border-radius:var(--sui-checkbox-height);width:calc(var(--sui-checkbox-height) - 7px);height:calc(var(--sui-checkbox-height) - 7px);background-color:var(--sui-primary-accent-color);opacity:0;transition:all 200ms;will-change:opacity;}.radio.svelte-9pa8i8 button[aria-checked=true] {border-color:var(--sui-primary-accent-color);}.radio.svelte-9pa8i8 button[aria-checked=true]::before {opacity:1;}.radio.svelte-9pa8i8 label:where(.svelte-9pa8i8) {cursor:inherit;}'};function sK(t,e){const n=Jn();ae(e,!0),ke(t,aK);let r=N(e,"checked",7,!1),i=N(e,"hidden",3,!1),o=N(e,"disabled",3,!1),a=N(e,"name",3,void 0),s=N(e,"value",3,void 0),l=N(e,"valueType",3,void 0),u=N(e,"label",3,void 0),d=N(e,"group",15),f=ot(e,["$$slots","$$events","$$legacy","checked","class","hidden","disabled","name","value","valueType","label","group","children","onChange","onSelect"]),h=ie(void 0);ze(()=>{typeof d()=="string"&&(d()===s()?r()||r(!0):r()&&r(!1))});var p=oK(),g=y=>{y.target.matches("button")||c(h)?.click()};mt(p,()=>({...f,role:"none",class:`sui radio ${e.class??""}`,hidden:i(),onclick:g,[Nr]:{disabled:o()}}),void 0,void 0,void 0,"svelte-9pa8i8");var m=F(p);et(m,{role:"radio",get id(){return n},get hidden(){return i()},get disabled(){return o()},get name(){return a()},get value(){return s()},get valueType(){return l()},get"aria-checked"(){return r()},get"aria-labelledby"(){return`${n}-label`},onclick:y=>{y.preventDefault(),!(o()||r())&&(r(!0),typeof d()=="string"&&d(s()))},get onChange(){return e.onChange},get onSelect(){return e.onSelect},get element(){return c(h)},set element(y){V(h,y,!0)}});var v=z(m,2);{var b=y=>{var w=iK(),x=F(w);{var E=A=>{var k=X(),T=M(k);Ue(T,()=>e.children??He),S(A,k)},$=A=>{var k=Fe();Z(()=>ne(k,u())),S(A,k)};U(x,A=>{e.children?A(E):A($,!1)})}Z(()=>Se(w,"id",`${n}-label`)),S(y,w)};U(v,y=>{(e.children||u())&&y(b)})}S(t,p),se()}var lK=j('<div role="none" class="spinner svelte-1fzqqm7"></div>'),cK=j("<!> <!>",1);const uK={hash:"svelte-1fzqqm7",code:".spinner.svelte-1fzqqm7 {height:1px;}"};function _c(t,e){ae(e,!0),ke(t,uK);let n=N(e,"itemChunkSize",3,25),r=_(n),i=ie(void 0);const o=_(()=>e.items.length>c(r)),a=new IntersectionObserver(([{isIntersecting:f}])=>{f&&(c(o)?V(r,c(r)+n()):a.disconnect())});ze(()=>{c(i)&&a.observe(c(i))});var s=cK(),l=M(s);rt(l,19,()=>e.items.slice(0,c(r)),(f,h)=>f[e.itemKey]??h,(f,h,p)=>{var g=X(),m=M(g);Ue(m,()=>e.renderItem,()=>c(h),()=>c(p)),S(f,g)});var u=z(l,2);{var d=f=>{var h=lK();St(h,p=>V(i,p),()=>c(i)),S(f,h)};U(u,f=>{c(o)&&f(d)})}S(t,s),se()}var dK=j('<div><span role="none" class="svelte-f97rc8"><!></span> <!> <!></div>');const fK={hash:"svelte-f97rc8",code:".search-bar.svelte-f97rc8 {display:inline-flex;align-items:center;position:relative;margin:var(--sui-focus-ring-width);min-width:var(--sui-textbox-singleline-min-width);}.search-bar.flex.svelte-f97rc8 {width:-moz-available;width:-webkit-fill-available;width:stretch;min-width:0;}.search-bar.svelte-f97rc8 > span:where(.svelte-f97rc8) {position:absolute;inset-block:0;inset-inline-start:0;inset-inline-end:auto;z-index:2;display:flex;align-items:center;justify-content:center;width:var(--sui-button-medium-height);height:var(--sui-button-medium-height);}.search-bar.svelte-f97rc8 .icon {font-size:calc(var(--sui-textbox-height) * 0.6);opacity:0.5;}.search-bar.svelte-f97rc8 > button {position:absolute;inset-block:0;inset-inline-start:auto;inset-inline-end:0;z-index:2;margin:0 !important;height:var(--sui-button-medium-height);}.search-bar.svelte-f97rc8 .label {--sui-textbox-singleline-padding: 0 36px;}.search-bar.svelte-f97rc8 .text-input {flex:auto;margin:0 !important;width:0;min-width:0 !important;}.search-bar.svelte-f97rc8 input {z-index:1;padding:0 var(--sui-button-medium-height) !important;width:100%;}"};function Qm(t,e){const n=Jn();ae(e,!0),ke(t,fK);const r=()=>H(ce,"$_",i),[i,o]=ve();let a=N(e,"value",15),s=N(e,"flex",3,!1),l=N(e,"hidden",3,!1),u=N(e,"disabled",3,!1),d=N(e,"readonly",3,!1),f=N(e,"required",3,!1),h=N(e,"invalid",3,!1),p=ot(e,["$$slots","$$events","$$legacy","value","flex","class","hidden","disabled","readonly","required","invalid","children","searchIcon","closeIcon"]),g=ie(void 0);var v={focus:()=>{c(g)?.focus()}},b=dK();let y;var w=F(b),x=F(w);{var E=P=>{var O=X(),I=M(O);Ue(I,()=>e.searchIcon),S(P,O)},$=P=>{Qe(P,{name:"search"})};U(x,P=>{e.searchIcon?P(E):P($,!1)})}var A=z(w,2);Yn(A,Qt(()=>p,{role:"searchbox",get id(){return n},get flex(){return s()},get hidden(){return l()},get disabled(){return u()},get readonly(){return d()},get required(){return f()},get invalid(){return h()},inputmode:"search",get element(){return c(g)},set element(P){V(g,P,!0)},get value(){return a()},set value(P){a(P)}}));var k=z(A,2);{var T=P=>{{const O=L=>{var D=X(),B=M(D);{var K=W=>{var Y=X(),R=M(Y);Ue(R,()=>e.closeIcon),S(W,Y)},G=W=>{Qe(W,{name:"close"})};U(B,W=>{e.closeIcon?W(K):W(G,!1)})}S(L,D)};let I=_(()=>r()("_sui.clear"));et(P,{iconic:!0,get"aria-label"(){return c(I)},get"aria-controls"(){return n},onclick:()=>{a(""),c(g)?.focus(),globalThis.requestIdleCallback(()=>{c(g)?.dispatchEvent(new KeyboardEvent("input")),c(g)?.dispatchEvent(new KeyboardEvent("keypress")),c(g)?.dispatchEvent(new KeyboardEvent("change"))})},startIcon:O,$$slots:{startIcon:!0}})}};U(k,P=>{a()&&P(T)})}Z(()=>{Se(b,"role",l()?void 0:"none"),y=hn(b,1,`sui search-bar ${e.class??""}`,"svelte-f97rc8",y,{flex:s(),disabled:u(),readonly:d()}),Se(b,"hidden",l()),Se(b,"aria-hidden",l())}),S(t,b);var C=se(v);return o(),C}var hK=j('<div><div role="none" class="label svelte-y6pjc9"><!></div></div>'),pK=j('<div role="alert" class="no-options svelte-y6pjc9"> </div>'),gK=j('<div role="none" class="combobox-inner svelte-y6pjc9"><!> <!> <!></div>'),mK=j("<div><!> <!></div> <!>",1);const vK={hash:"svelte-y6pjc9",code:`.combobox.svelte-y6pjc9 {margin:var(--sui-focus-ring-width);display:flex;align-items:center;position:relative;min-width:var(--sui-combobox-min-width, calc(var(--sui-option-height) * 5));}.combobox.svelte-y6pjc9 div[role=combobox]:where(.svelte-y6pjc9) {display:flex;align-items:center;border-width:1px;border-color:var(--sui-control-border-color);border-radius:var(--sui-textbox-border-radius);padding-block:0;padding-inline-start:calc(var(--sui-textbox-height) / 4);padding-inline-end:var(--sui-textbox-height);width:100%;height:var(--sui-textbox-height);color:var(--sui-control-foreground-color);background-color:var(--sui-disabled-background-color);font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);-webkit-user-select:none;user-select:none;cursor:pointer;transition:all 200ms;}.combobox.svelte-y6pjc9 div[role=combobox]:where(.svelte-y6pjc9):not(.selected) {font-style:italic;}.combobox.svelte-y6pjc9 div[role=combobox]:where(.svelte-y6pjc9):is(:where(.svelte-y6pjc9):hover, :where(.svelte-y6pjc9):focus) {background-color:var(--sui-hover-background-color);}.combobox.svelte-y6pjc9 div[role=combobox][aria-invalid=true]:where(.svelte-y6pjc9) {border-color:var(--sui-error-border-color);}.combobox.svelte-y6pjc9 div[role=combobox]:where(.svelte-y6pjc9) .label:where(.svelte-y6pjc9) {width:100%;}.combobox.svelte-y6pjc9 .icon {font-size:var(--sui-font-size-xx-large);opacity:0.5;}.combobox.svelte-y6pjc9 > .icon {position:absolute;inset-block-start:8px;inset-inline-start:8px;z-index:1;}.combobox.svelte-y6pjc9 > button {position:absolute;inset-block-start:0;inset-inline-end:0;z-index:1;margin:0 !important;border-start-start-radius:0;border-end-start-radius:0;background-color:transparent !important;}.combobox.svelte-y6pjc9 > button[tabindex="-1"] {pointer-events:none;}.combobox.svelte-y6pjc9 :not(.editable) > button {background-color:transparent !important;}.combobox.svelte-y6pjc9 .text-input {margin:0 !important;width:100% !important;}.combobox.svelte-y6pjc9 input {padding-block:0;padding-inline:8px 32px;width:0;}.combobox.svelte-y6pjc9 + [role=listbox] {position:fixed;z-index:100;border-radius:var(--sui-control-medium-border-radius);box-shadow:0 8px 16px var(--sui-popup-shadow-color);overflow:auto;background-color:var(--sui-secondary-background-color);-webkit-backdrop-filter:blur(32px);backdrop-filter:blur(32px);
|
|
372
|
+
/* Add .1s delay before the position can be determined */transition:opacity 100ms 100ms;}.combobox.svelte-y6pjc9 + [role=listbox]:not(.open) {opacity:0;pointer-events:none;}.combobox-inner.svelte-y6pjc9 {display:flex;flex-direction:column;overflow:hidden;}.combobox-inner.svelte-y6pjc9 .sui.search-bar {flex:none;}.combobox-inner.svelte-y6pjc9 .sui.listbox {flex:auto;overflow-y:auto;}.combobox-inner.svelte-y6pjc9 .no-options:where(.svelte-y6pjc9) {flex:none;display:flex;align-items:center;padding:var(--sui-option-padding);height:var(--sui-option-height);color:var(--sui-tertiary-foreground-color);}`};function _K(t,e){const n=Jn();ae(e,!0),ke(t,vK);const r=()=>H(ce,"$_",i),[i,o]=ve();let a=N(e,"value",15),s=N(e,"hidden",3,!1),l=N(e,"disabled",3,!1),u=N(e,"readonly",3,!1),d=N(e,"required",3,!1),f=N(e,"invalid",3,!1),h=N(e,"editable",3,!0),p=N(e,"position",3,"bottom-left"),g=N(e,"filterThreshold",3,5),m=ot(e,["$$slots","$$events","$$legacy","value","class","hidden","disabled","readonly","required","invalid","editable","position","filterThreshold","children","chevronIcon","onChange"]);const v='[role="option"][aria-selected="true"]';let b=ie(!1),y=ie(void 0),w=ie(void 0),x=ie(void 0),E=ie(""),$=ie(!1),A=ie(""),k=ie(!0);const T=_(()=>c(y)??c(w)),C=()=>{const W=c(x)?.querySelector(v),Y=c(x)?.querySelector(`[role="option"][data-value="${a()}"]`);Y&&(V(E,Y.dataset.label||Y.dataset.value||Y.textContent||"",!0),W!==Y&&(W?.setAttribute("aria-selected","false"),Y.setAttribute("aria-selected","true")))},P=W=>{const Y=fL(W);a(Y.value),C(),e.onChange?.(new CustomEvent("Change",{detail:Y}))};ze(()=>{c(x)&&globalThis.requestAnimationFrame(()=>{const W=c(x)?.querySelector(v);W&&P(W)})}),ze(()=>{a(),C()});var O=mK(),I=M(O);mt(I,()=>({...m,role:"none",class:`sui combobox ${e.class??""}`,hidden:s(),[Nr]:{editable:h()}}),void 0,void 0,void 0,"svelte-y6pjc9");var L=F(I);{var D=W=>{var Y=hK();mt(Y,()=>({...m,role:"combobox",id:n,tabindex:l()?-1:0,"aria-controls":`${n}-popup`,"aria-expanded":c(b),"aria-hidden":s(),"aria-disabled":l(),"aria-readonly":u(),"aria-required":d(),"aria-invalid":f(),"aria-haspopup":"listbox",[Nr]:{selected:a()!==void 0}}),void 0,void 0,void 0,"svelte-y6pjc9");var R=F(Y),q=F(R);Ur(q,{children:(J,Q)=>{var ee=Fe();Z(re=>ne(ee,re),[()=>a()!==void 0?c(E):r()("_sui.combobox.select_an_option")]),S(J,ee)},$$slots:{default:!0}}),St(Y,J=>V(y,J),()=>c(y)),S(W,Y)},B=W=>{{let Y=_(()=>a()===void 0?"":String(a()));Yn(W,Qt(()=>m,{role:"combobox",get id(){return n},get value(){return c(Y)},get hidden(){return s()},get disabled(){return l()},get readonly(){return u()},get required(){return d()},get invalid(){return f()},get"aria-controls"(){return`${n}-popup`},get"aria-expanded"(){return c(b)},"aria-haspopup":"listbox",get element(){return c(w)},set element(R){V(w,R,!0)}}))}};U(L,W=>{h()?W(B,!1):W(D)})}var K=z(L,2);{const W=q=>{var J=X(),Q=M(J);{var ee=te=>{var de=X(),he=M(de);Ue(he,()=>e.chevronIcon),S(te,de)},re=te=>{Qe(te,{name:"expand_more"})};U(Q,te=>{e.chevronIcon?te(ee):te(re,!1)})}S(q,J)};let Y=_(()=>!h()||u()||l()?-1:0),R=_(()=>c(b)?r()("_sui.collapse"):r()("_sui.expand"));et(K,{variant:"ghost",iconic:!0,get hidden(){return s()},get disabled(){return l()},get tabindex(){return c(Y)},get"aria-label"(){return c(R)},get"aria-controls"(){return`${n}-popup`},get"aria-expanded"(){return c(b)},onclick:q=>{q.preventDefault(),q.stopPropagation(),!l()&&!u()&&V(b,!c(b))},startIcon:W,$$slots:{startIcon:!0}})}var G=z(I,2);Ym(G,{get id(){return`${n}-popup`},class:"combobox",get anchor(){return c(T)},get position(){return p()},touchOptimized:!0,onOpen:()=>{V($,g()===-1?!1:(c(x)?.querySelectorAll('[role="option"]')?.length??0)>g(),!0),V(A,"")},get content(){return c(x)},set content(W){V(x,W,!0)},get open(){return c(b)},set open(W){V(b,W,!0)},children:(W,Y)=>{var R=gK(),q=F(R);{var J=te=>{{let de=_(()=>r()("_sui.combobox.filter_options"));Qm(te,{flex:!0,get"aria-label"(){return c(de)},get"aria-controls"(){return`${n}-listbox`},onkeydown:he=>{["ArrowUp","ArrowDown","Enter"].includes(he.key)&&(he.preventDefault(),c(x)?.querySelector(".sui.listbox")?.dispatchEvent(new KeyboardEvent("keydown",he)))},get value(){return c(A)},set value(he){V(A,he,!0)}})}};U(q,te=>{c($)&&te(J)})}var Q=z(q,2);vd(Q,{get id(){return`${n}-listbox`},class:"in-combobox",get searchTerms(){return c(A)},onclick:te=>{te.target.matches('[role="option"]')&&P(te.target)},onFilter:te=>{V(k,!!te.detail.matched)},children:(te,de)=>{var he=X(),ue=M(he);Ue(ue,()=>e.children??He),S(te,he)},$$slots:{default:!0}});var ee=z(Q,2);{var re=te=>{var de=pK(),he=F(de);Z(ue=>ne(he,ue),[()=>r()("_sui.combobox.no_matching_options")]),S(te,de)};U(ee,te=>{c(k)||te(re)})}S(W,R)},$$slots:{default:!0}}),S(t,O),se(),o()}function bc(t,e){ae(e,!0);let n=N(e,"value",15),r=N(e,"hidden",3,!1),i=N(e,"disabled",3,!1),o=N(e,"readonly",3,!1),a=N(e,"required",3,!1),s=N(e,"invalid",3,!1),l=ot(e,["$$slots","$$events","$$legacy","value","class","hidden","disabled","readonly","required","invalid","children","onChange"]);_K(t,Qt(()=>l,{get class(){return`sui select ${e.class??""}`},get hidden(){return r()},get disabled(){return i()},get readonly(){return o()},get required(){return a()},get invalid(){return s()},get onChange(){return e.onChange},editable:!1,get value(){return n()},set value(u){n(u)},children:(u,d)=>{var f=X(),h=M(f);Ue(h,()=>e.children??He),S(u,f)},$$slots:{default:!0}})),se()}var bK=j('<span role="none" class="svelte-4p35d0"> <!></span>'),yK=j('<div role="none"><!> <!></div>');const wK={hash:"svelte-4p35d0",code:".select-tags.svelte-4p35d0 {display:flex;flex-wrap:wrap;align-items:center;}.select-tags.disabled.svelte-4p35d0 {pointer-events:none;}.select-tags.disabled.svelte-4p35d0 > :where(.svelte-4p35d0) {opacity:0.5;}.select-tags.svelte-4p35d0 span:where(.svelte-4p35d0) {display:inline-flex;align-items:center;margin:var(--sui-focus-ring-width);padding:0;padding-inline-start:8px;border-radius:var(--sui-control-medium-border-radius);background-color:var(--sui-secondary-background-color);}.select-tags.svelte-4p35d0 span:where(.svelte-4p35d0) .icon {font-size:var(--sui-font-size-large);}"};function xK(t,e){ae(e,!0),ke(t,wK);const n=()=>H(ce,"$_",r),[r,i]=ve();let o=N(e,"values",31,()=>At([])),a=N(e,"max",3,void 0),s=N(e,"hidden",3,!1),l=N(e,"disabled",3,!1),u=N(e,"readonly",3,!1),d=N(e,"required",3,!1),f=N(e,"invalid",3,!1),h=ot(e,["$$slots","$$events","$$legacy","values","options","max","class","hidden","disabled","readonly","required","invalid","children","onAddValue","onRemoveValue"]),p=ie(void 0);var g=yK();let m;var v=F(g);rt(v,17,o,yr,(w,x)=>{const E=_(()=>e.options.find(T=>T.value===c(x)));var $=X(),A=M($);{var k=T=>{var C=bK(),P=F(C),O=z(P);{const I=B=>{Qe(B,{name:"close"})};let L=_(()=>l()||u()),D=_(()=>n()("remove_x",{values:{name:c(E).label}}));et(O,{iconic:!0,size:"small",get disabled(){return c(L)},get"aria-label"(){return c(D)},onclick:()=>{o(o().filter(B=>B!==c(x))),e.onRemoveValue?.(new CustomEvent("RemoveValue",{detail:{value:c(x)}}))},startIcon:I,$$slots:{startIcon:!0}})}Z(()=>ne(P,`${c(E).label??""} `)),S(T,C)};U(A,T=>{c(E)&&T(k)})}S(w,$)});var b=z(v,2);{var y=w=>{{let x=_(()=>l()||u());bc(w,Qt(()=>h,{get disabled(){return c(x)},get readonly(){return u()},get required(){return d()},get invalid(){return f()},onChange:()=>{c(p)&&(o([...o(),c(p)]),e.onAddValue?.(new CustomEvent("AddValue",{detail:{value:c(p)}})),V(p,void 0))},get value(){return c(p)},set value(E){V(p,E,!0)},children:(E,$)=>{var A=X(),k=M(A);rt(k,17,()=>e.options,({label:T,value:C,searchValue:P})=>C,(T,C)=>{let P=()=>c(C).label,O=()=>c(C).value,I=()=>c(C).searchValue;var L=X(),D=M(L);{var B=K=>{Mr(K,{get label(){return P()},get value(){return O()},get searchValue(){return I()}})};U(D,K=>{o().includes(O())||K(B)})}S(T,L)}),S(E,A)},$$slots:{default:!0}}))}};U(b,w=>{(typeof a()!="number"||o().length<a())&&o().length<e.options.length&&w(y)})}Z(()=>{m=hn(g,1,`sui select-tags ${e.class??""}`,"svelte-4p35d0",m,{disabled:l()||u()}),Se(g,"hidden",s())}),S(t,g),se(),i()}var kK=j('<div role="slider" class="svelte-1iz2tkw"></div>'),SK=j('<span role="none" class="label svelte-1iz2tkw"> </span>'),EK=j('<div><div role="none" class="base svelte-1iz2tkw"><div role="none" class="base-bar svelte-1iz2tkw"></div> <div class="slider-bar svelte-1iz2tkw"></div> <div role="slider" class="svelte-1iz2tkw"></div> <!> <!></div></div>');const TK={hash:"svelte-1iz2tkw",code:".slider.svelte-1iz2tkw {position:relative;display:inline-block;margin:var(--sui-focus-ring-width);padding:4px 6px;touch-action:none;}.slider.svelte-1iz2tkw:hover .base-bar:where(.svelte-1iz2tkw) {background-color:var(--sui-hover-background-color);}.slider.svelte-1iz2tkw:active .base-bar:where(.svelte-1iz2tkw) {background-color:var(--sui-active-background-color);}.base.svelte-1iz2tkw {position:relative;width:var(--sui-slider-base-width, 240px);height:calc(var(--sui-checkbox-height) / 2);cursor:pointer;}.base-bar.svelte-1iz2tkw {border-width:1px;border-style:solid;border-color:var(--sui-control-border-color);border-radius:var(--sui-checkbox-height);background-color:var(--sui-slider-background-color, var(--sui-secondary-background-color));transition:all 200ms;width:100%;height:100%;}.slider-bar.svelte-1iz2tkw {position:absolute;top:0;height:calc(var(--sui-checkbox-height) / 2);border-radius:var(--sui-checkbox-height);background-color:var(--sui-primary-accent-color-light);}.invalid.svelte-1iz2tkw .slider-bar:where(.svelte-1iz2tkw) {background-color:var(--sui-error-border-color);}[role=slider].svelte-1iz2tkw {position:absolute;top:0;border:3px solid var(--sui-primary-accent-color-light);border-radius:var(--sui-checkbox-height);width:calc(var(--sui-checkbox-height) - 2px);height:calc(var(--sui-checkbox-height) - 2px);background-color:var(--sui-primary-accent-color-inverted);cursor:pointer;}[role=slider].svelte-1iz2tkw:dir(ltr) {transform:translate(calc((var(--sui-checkbox-height) / 2 - 1px) * -1), calc((var(--sui-checkbox-height) / 4 - 1px) * -1));}[role=slider].svelte-1iz2tkw:dir(rtl) {transform:translate(calc(var(--sui-checkbox-height) / 2 - 1px), calc((var(--sui-checkbox-height) / 4 - 1px) * -1));}.invalid.svelte-1iz2tkw [role=slider]:where(.svelte-1iz2tkw) {border-color:var(--sui-error-border-color);}.label.svelte-1iz2tkw {position:absolute;top:calc(var(--sui-checkbox-height) / 2 + 8px);font-size:var(--sui-font-size-x-small);}.label.svelte-1iz2tkw:dir(ltr) {transform:translateX(-50%);}.label.svelte-1iz2tkw:dir(rtl) {transform:translateX(50%);}"};function $K(t,e){ae(e,!0),ke(t,TK);const n=()=>H(Gl,"$isRTL",r),[r,i]=ve();let o=N(e,"value",15,0),a=N(e,"min",3,0),s=N(e,"max",3,100),l=N(e,"sliderLabel",3,""),u=N(e,"values",15,void 0),d=N(e,"sliderLabels",3,void 0),f=N(e,"step",3,1),h=N(e,"optionLabels",19,()=>[]),p=N(e,"hidden",3,!1),g=N(e,"disabled",3,!1),m=N(e,"readonly",3,!1),v=N(e,"invalid",3,!1),b=ot(e,["$$slots","$$events","$$legacy","value","min","max","sliderLabel","values","sliderLabels","step","optionLabels","class","hidden","disabled","readonly","invalid","children","onChange"]);const y=_(()=>Array.isArray(u()));let w=ie(void 0),x=ie(0),E=ie(At([])),$=ie(At([])),A=ie(0),k=ie(0),T=At([0,0]),C=ie(!1),P=ie(0),O=ie(0);const I=ue=>{const ge=n()?c(x)-ue:ue;if(ge<0||ge>c(x))return;const ye=c(E).findLastIndex(fe=>fe<=ge),me=c(E).findIndex(fe=>ge<=fe),Ae=Math.abs(c(E)[ye]-ge),Ce=Math.abs(c(E)[me]-ge),_e=Ae<Ce?ye:me;T[c(O)]===c(E)[_e]||c(y)&&(c(O)===0&&T[1]<=c(E)[_e]||c(O)===1&&T[0]>=c(E)[_e])||(c(y)?(u(u()[c(O)]=c($)[_e],!0),u([...u()])):o(c($)[_e]))},L=(ue,ge=0)=>{const{key:ye,ctrlKey:me,metaKey:Ae,shiftKey:Ce,altKey:_e}=ue,fe=Ce||_e||me||Ae;if(g()||m()||fe)return;const be=c(y)?u()[ge]:o();let Oe=-1;const je=n()?["ArrowDown","ArrowRight"]:["ArrowDown","ArrowLeft"],Re=n()?["ArrowUp","ArrowLeft"]:["ArrowUp","ArrowRight"];if(je.includes(ye)&&(be>a()&&(Oe=c($).indexOf(be)-1),ue.preventDefault(),ue.stopPropagation()),Re.includes(ye)&&(be<s()&&(Oe=c($).indexOf(be)+1),ue.preventDefault(),ue.stopPropagation()),Oe>-1){if(c(y)&&(ge===0&&T[1]<=c(E)[Oe]||ge===1&&T[0]>=c(E)[Oe]))return;c(y)?(u(u()[ge]=c($)[Oe],!0),u([...u()])):o(c($)[Oe])}},D=ue=>{const{screenX:ge,pointerId:ye}=ue;if(g()||m()||!c(C)||ye!==c(P))return;ue.stopPropagation();const me=ge-c(k),Ae=c(A)+me;I(Ae)},B=ue=>{const{pointerId:ge}=ue;if(!(g()||m()||!c(C)||ge!==c(P))){if(ue.stopPropagation(),ue.target.matches(".base-bar, .slider-bar")){const ye=c(w).getBoundingClientRect(),me=ue.clientX-ye.left;I(me)}V(C,!1),V(A,0),V(k,0),V(P,0),V(O,0),document.removeEventListener("pointermove",D),document.removeEventListener("pointerup",B),document.removeEventListener("pointercancel",B)}},K=(ue,ge=0)=>{const{clientX:ye,screenX:me,pointerId:Ae}=ue;if(g()||m())return;ue.stopPropagation(),V(C,!0);const Ce=c(w).getBoundingClientRect();V(A,ye-Ce.left),V(k,me,!0),V(P,Ae,!0),V(O,ge,!0),document.addEventListener("pointermove",D),document.addEventListener("pointerup",B),document.addEventListener("pointercancel",B)},G=()=>{if(c(y)){const[ue,ge]=u();T[0]=c(E)[c($).indexOf(ue)],T[1]=c(E)[c($).indexOf(ge)],e.onChange?.({values:u()})}else T[0]=c(E)[c($).indexOf(o())],e.onChange?.({value:o()})},W=()=>{if(!c(w))return;V(x,c(w).clientWidth,!0);const ue=(s()-a())/f()+1,ge=c(x)/(ue-1),ye=Array.from({length:ue});V($,ye.map((me,Ae)=>Ae*f()+a(),10),!0),V(E,ye.map((me,Ae)=>Ae*ge),!0),G()};Vt(()=>{const ue=new ResizeObserver(()=>W()),ge=globalThis.matchMedia("(pointer: coarse)");return ue.observe(c(w)),ge.addEventListener("change",W),W(),()=>{ue.disconnect(),ge.removeEventListener("change",W)}}),ze(()=>{o(),u(),G()});var Y=EK();ui("click",ww.body,()=>{V(C,!1)}),mt(Y,()=>({...b,role:"none",class:`sui slider ${e.class??""}`,hidden:p(),[Nr]:{disabled:g(),readonly:m(),invalid:v()}}),void 0,void 0,void 0,"svelte-1iz2tkw");var R=F(Y);R.__pointerdown=ue=>K(ue);var q=z(F(R),2);let J;var Q=z(q,2);Q.__pointerdown=ue=>K(ue,0),Q.__keydown=ue=>L(ue,0);let ee;var re=z(Q,2);{var te=ue=>{var ge=kK();ge.__pointerdown=me=>K(me,1),ge.__keydown=me=>L(me,1);let ye;Z(()=>{Se(ge,"tabindex",g()?-1:0),Se(ge,"aria-label",d()?.[1]),Se(ge,"aria-hidden",p()),Se(ge,"aria-disabled",g()),Se(ge,"aria-readonly",m()),Se(ge,"aria-invalid",v()),Se(ge,"aria-valuemin",a()),Se(ge,"aria-valuemax",s()),Se(ge,"aria-valuenow",u()?.[1]),ye=Co(ge,"",ye,{"inset-inline-start":`${T[1]??""}px`})}),S(ue,ge)};U(re,ue=>{c(y)&&ue(te)})}var de=z(re,2);{var he=ue=>{var ge=X(),ye=M(ge);rt(ye,17,h,yr,(me,Ae,Ce)=>{var _e=SK();let fe;var be=F(_e);Z(()=>{fe=Co(_e,"",fe,{"inset-inline-start":`${c(x)/(h().length-1)*Ce}px`}),ne(be,c(Ae))}),S(me,_e)}),S(ue,ge)};U(de,ue=>{h().length&&ue(he)})}St(R,ue=>V(w,ue),()=>c(w)),Z(()=>{J=Co(q,"",J,{"inset-inline-start":`${(c(y)?T[0]:0)??""}px`,width:`${(c(y)?T[1]-T[0]:T[0])??""}px`}),Se(Q,"tabindex",g()?-1:0),Se(Q,"aria-label",c(y)?d()?.[0]:l()),Se(Q,"aria-hidden",p()),Se(Q,"aria-disabled",g()),Se(Q,"aria-readonly",m()),Se(Q,"aria-invalid",v()),Se(Q,"aria-valuemin",a()),Se(Q,"aria-valuemax",s()),Se(Q,"aria-valuenow",c(y)?u()?.[0]:o()),ee=Co(Q,"",ee,{"inset-inline-start":`${T[0]??""}px`})}),S(t,Y),se(),i()}lc(["pointerdown","keydown"]);var AK=j('<button><span role="none" class="svelte-1alqc02"></span> <!></button>');const CK={hash:"svelte-1alqc02",code:'button.svelte-1alqc02 {display:inline-flex;align-items:center;gap:8px;margin:var(--sui-focus-ring-width);border-width:0;border-style:solid;border-color:transparent;padding:0;color:var(--sui-control-foreground-color);background-color:transparent;box-shadow:none;font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);font-weight:var(--sui-font-weight-normal, normal);text-align:start;cursor:pointer;-webkit-user-select:none;user-select:none;}button[aria-invalid=true].svelte-1alqc02 span:where(.svelte-1alqc02) {background-color:var(--sui-error-border-color) !important;}button:hover[aria-checked=false].svelte-1alqc02 span:where(.svelte-1alqc02) {background-color:var(--sui-hover-background-color);}button:hover[aria-checked=true].svelte-1alqc02 span:where(.svelte-1alqc02) {background-color:var(--sui-primary-accent-color-light);}button:active[aria-checked=false].svelte-1alqc02 span:where(.svelte-1alqc02) {background-color:var(--sui-active-background-color);}button:active[aria-checked=true].svelte-1alqc02 span:where(.svelte-1alqc02) {background-color:var(--sui-primary-accent-color-dark);}button.svelte-1alqc02:focus-visible {outline:0;}button.svelte-1alqc02:focus-visible span:where(.svelte-1alqc02) {outline-color:var(--sui-primary-accent-color-translucent);}button[aria-checked=true].svelte-1alqc02 span:where(.svelte-1alqc02) {background-color:var(--sui-primary-accent-color);border-color:transparent;}button[aria-checked=true].svelte-1alqc02 span:where(.svelte-1alqc02)::before {--translateX: var(--sui-checkbox-height) * 2 - var(--sui-checkbox-height);border-color:var(--sui-primary-accent-color);background-color:var(--sui-primary-accent-color-inverted);}button[aria-checked=true].svelte-1alqc02 span:where(.svelte-1alqc02):dir(ltr)::before {transform:translateX(calc(var(--translateX)));}button[aria-checked=true].svelte-1alqc02 span:where(.svelte-1alqc02):dir(rtl)::before {transform:translateX(calc((var(--translateX)) * -1));}span.svelte-1alqc02 {position:relative;width:calc(var(--sui-checkbox-height) * 2);height:var(--sui-checkbox-height);padding:0 2px;display:inline-flex;align-items:center;border-width:1.5px;border-style:solid;border-color:var(--sui-checkbox-border-color);border-radius:var(--sui-checkbox-height);background-color:var(--sui-control-background-color);transition:all 200ms;}span.svelte-1alqc02::before {display:inline-block;width:calc(var(--sui-checkbox-height) - 6px);height:calc(var(--sui-checkbox-height) - 6px);border-radius:var(--sui-checkbox-height);background-color:var(--sui-checkbox-border-color);transition:all 200ms;content:"";}'};function w0(t,e){ae(e,!0),ke(t,CK);let n=N(e,"checked",15),r=N(e,"label",3,void 0),i=N(e,"hidden",3,!1),o=N(e,"disabled",3,!1),a=N(e,"readonly",3,!1),s=N(e,"required",3,!1),l=N(e,"invalid",3,!1),u=ot(e,["$$slots","$$events","$$legacy","checked","label","class","hidden","disabled","readonly","required","invalid","children","onChange"]);var d=AK(),f=()=>{!o()&&!a()&&(n(!n()),e.onChange?.(new CustomEvent("Change",{detail:{checked:n()}})))};mt(d,()=>({...u,role:"switch",class:`sui switch ${e.class??""}`,type:"button",hidden:i(),disabled:o()||void 0,"aria-checked":n(),"aria-hidden":i(),"aria-disabled":o(),"aria-readonly":a(),"aria-required":s(),"aria-invalid":l(),onclick:f}),void 0,void 0,void 0,"svelte-1alqc02");var h=z(F(d),2);{var p=m=>{var v=Fe();Z(()=>ne(v,r())),S(m,v)},g=m=>{var v=X(),b=M(v);Ue(b,()=>e.children??He),S(m,v)};U(h,m=>{r()?m(p):m(g,!1)})}S(t,d),se()}var PK=j("<div><!></div>");const OK={hash:"svelte-oc501t",code:".table-cell.svelte-oc501t {display:table-cell;}"};function cE(t,e){ke(t,OK);let n=ot(e,["$$slots","$$events","$$legacy","class","children"]);var r=PK();mt(r,()=>({...n,role:"cell",class:`sui table-cell ${e.class??""}`}),void 0,void 0,void 0,"svelte-oc501t");var i=F(r);Ue(i,()=>e.children??He),S(t,r)}var LK=j("<div><!></div>");const IK={hash:"svelte-l8j1cp",code:".table-row.svelte-l8j1cp {display:table-row;height:var(--sui-primary-row-height);}"};function NK(t,e){ke(t,IK);let n=ot(e,["$$slots","$$events","$$legacy","class","children"]);var r=LK();mt(r,()=>({...n,role:"row",class:`sui table-row ${e.class??""}`}),void 0,void 0,void 0,"svelte-l8j1cp");var i=F(r);Ue(i,()=>e.children??He),S(t,r)}var RK=j("<div><!></div>");const MK={hash:"svelte-ukuv5g",code:".table.svelte-ukuv5g {display:table;margin:var(--sui-focus-ring-width);width:calc(100% - var(--sui-focus-ring-width) * 2);}.table.data.svelte-ukuv5g {border-collapse:collapse;}.table.data.svelte-ukuv5g :is(.table-col-header, .table-row-header, .table-cell) {border:1px solid var(--sui-secondary-border-color);padding:8px 8px;}"};function DK(t,e){ke(t,MK);let n=ot(e,["$$slots","$$events","$$legacy","class","children"]);var r=RK();mt(r,()=>({...n,role:"table",class:`sui table ${e.class??""}`}),void 0,void 0,void 0,"svelte-ukuv5g");var i=F(r);Ue(i,()=>e.children??He),S(t,r)}var FK=j('<div><div role="none" class="inner svelte-z4hw5k"><!></div> <div role="none" class="indicator svelte-z4hw5k"></div></div>');const zK={hash:"svelte-z4hw5k",code:".tab-list.svelte-z4hw5k {flex:none;position:relative;display:flex;align-items:center;margin:var(--sui-tab-list-margin, var(--sui-focus-ring-width));border-color:var(--sui-tab-list-border-color, var(--sui-control-border-color));border-radius:var(--sui-tab-list-border-radius, 0);background-color:var(--sui-tab-list-background-color, transparent);}.tab-list[aria-orientation=horizontal].svelte-z4hw5k {gap:var(--sui-horizontal-tab-list-gap, var(--sui-tab-list-gap, 8px));margin-block:var(--sui-horizontal-tab-list-margin-block, 0 32px);margin-inline:var(--sui-horizontal-tab-list-margin-inline, 0);border-block-width:var(--sui-horizontal-tab-list-border-block-width, 0 1px);border-inline-width:var(--sui-horizontal-tab-list-border-inline-width, 0 0);padding:var(--sui-horizontal-tab-list-padding, var(--sui-tab-list-padding, 0 16px));}.tab-list[aria-orientation=horizontal].svelte-z4hw5k button {width:var(--sui-horizontal-tab-width, var(--sui-tab-width, auto));height:var(--sui-horizontal-tab-height, var(--sui-tab-height, 100%));justify-content:var(--sui-horizontal-tab-justify-content, center);}.tab-list[aria-orientation=horizontal].svelte-z4hw5k .indicator:where(.svelte-z4hw5k) {border-block-width:var(--sui-horizontal-tab-list-indicator-border-block-width, 0 2px);border-inline-width:var(--sui-horizontal-tab-list-indicator-border-inline-width, 0 0);}.tab-list[aria-orientation=vertical].svelte-z4hw5k {gap:var(--sui-vertical-tab-list-gap, var(--sui-tab-list-gap, 8px));flex-direction:column;margin-block:var(--sui-vertical-tab-list-margin-block, 0);margin-inline:var(--sui-vertical-tab-list-margin-inline, 0 32px);border-block-width:var(--sui-vertical-tab-list-border-block-width, 0 0);border-inline-width:var(--sui-vertical-tab-list-border-inline-width, 0 1px);padding:var(--sui-vertical-tab-list-padding, var(--sui-tab-list-padding, 8px 0));width:var(--sui-vertical-tab-list-width, auto);}.tab-list[aria-orientation=vertical].svelte-z4hw5k button {justify-content:var(--sui-vertical-tab-justify-content, flex-start);padding-inline-end:32px;width:var(--sui-vertical-tab-width, var(--sui-tab-width, 100%));height:var(--sui-vertical-tab-height, var(--sui-tab-height, auto));}.tab-list[aria-orientation=vertical].svelte-z4hw5k .indicator:where(.svelte-z4hw5k) {border-block-width:var(--sui-vertical-tab-list-indicator-border-block-width, 0 0);border-inline-width:var(--sui-vertical-tab-list-indicator-border-inline-width, 0 2px);}.tab-list.svelte-z4hw5k button {position:relative;z-index:1;border-color:transparent;margin:0 !important;border-radius:var(--sui-tab-border-radius, 0);font-family:var(--sui-tab-font-family, var(--sui-control-font-family, inherit));font-size:var(--sui-tab-font-size, var(--sui-control-font-size, inherit));font-weight:var(--sui-tab-font-weight, var(--sui-control-font-weight, var(--sui-font-weight-normal, normal)));}.inner.svelte-z4hw5k {display:contents;}.indicator.svelte-z4hw5k {position:absolute;z-index:0;inset:auto;border-radius:var(--sui-tab-list-indicator-border-radius, 0);border-color:var(--sui-tab-list-indicator-border-color, var(--sui-primary-accent-color-light));background-color:var(--sui-tab-list-indicator-background-color, transparent);box-shadow:var(--sui-tab-list-indicator-box-shadow, none);pointer-events:none;transition:var(--sui-tab-list-indicator-transition, all 200ms);}"};function jK(t,e){ae(e,!0),ke(t,zK);let n=N(e,"hidden",3,!1),r=N(e,"disabled",3,!1),i=N(e,"orientation",3,"horizontal"),o=N(e,"name",3,void 0),a=ot(e,["$$slots","$$events","$$legacy","class","hidden","disabled","orientation","name","children","onChange"]),s=ie(void 0),l=ie(void 0);const u=()=>{globalThis.requestAnimationFrame(()=>{const v=c(s)?.querySelector('[role="tab"][aria-selected="true"]');if(v){const{offsetTop:b,offsetLeft:y,offsetWidth:w,offsetHeight:x}=v;V(l,Object.entries({top:b,left:y,width:w,height:x}).map(([E,$])=>`${E}: ${$}px`).join("; "),!0)}else V(l,void 0)})};Vt(()=>{const v=new ResizeObserver(()=>{u()});return v.observe(c(s)),()=>{v.disconnect()}});var d=FK(),f=()=>{u()},h=v=>{u(),e.onChange?.(v)};mt(d,()=>({...a,role:"tablist",class:`sui tab-list ${e.class??""}`,hidden:n(),"aria-hidden":n(),"aria-disabled":r(),"aria-orientation":i(),"data-name":o()||void 0,onInitialized:f,onChange:h}),void 0,void 0,void 0,"svelte-z4hw5k");var p=F(d),g=F(p);Ue(g,()=>e.children??He);var m=z(p,2);St(d,v=>V(s,v),()=>c(s)),Vs(d,v=>gd?.(v)),Z(()=>{p.inert=r(),Co(m,c(l))}),S(t,d),se()}var UK=j("<div><!></div>");const BK={hash:"svelte-y28y4i",code:".tab-panel.svelte-y28y4i {flex:auto;transition:all 200ms;}.tab-panel[aria-hidden=true].svelte-y28y4i, .tab-panel.svelte-y28y4i:not([aria-hidden]) {display:none;}"};function qK(t,e){ke(t,BK);let n=ot(e,["$$slots","$$events","$$legacy","class","children"]);var r=UK();mt(r,()=>({...n,role:"tabpanel",class:`sui tab-panel ${e.class??""}`}),void 0,void 0,void 0,"svelte-y28y4i");var i=F(r);Ue(i,()=>e.children??He),S(t,r)}function HK(t,e){let n=N(e,"hidden",3,!1),r=N(e,"disabled",3,!1),i=N(e,"selected",3,!1),o=ot(e,["$$slots","$$events","$$legacy","class","hidden","disabled","selected","children","startIcon","endIcon"]);et(t,Qt(()=>o,{role:"tab",get class(){return`sui tab ${e.class??""}`},get hidden(){return n()},get disabled(){return r()},get"aria-selected"(){return i()},startIcon:u=>{var d=X(),f=M(d);Ue(f,()=>e.startIcon??He),S(u,d)},children:u=>{var d=X(),f=M(d);Ue(f,()=>e.children??He),S(u,d)},endIcon:u=>{var d=X(),f=M(d);Ue(f,()=>e.endIcon??He),S(u,d)},$$slots:{startIcon:!0,default:!0,endIcon:!0}}))}var KK=j('<div role="none" class="sui toast-base svelte-1avsans"></div> <div><!></div>',1);const VK={hash:"svelte-1avsans",code:".toast-base.svelte-1avsans {position:fixed;inset:16px;z-index:99999;display:flex;flex-direction:column;justify-content:flex-end;align-items:flex-end;gap:8px;margin:0;border:0;padding:0;width:auto;height:auto;background-color:transparent;font-family:var(--sui-font-family-default);font-size:var(--sui-font-size-default);font-weight:var(--sui-font-weight-normal, normal);text-align:center;pointer-events:none;-webkit-user-select:none;user-select:none;}body:has(.sui.bottom-navigation:not([inert]:not([hidden]))) .toast-base {bottom:calc(var(--sui-bottom-navigation-height) + 16px);}.toast.svelte-1avsans {position:absolute;width:max-content;max-width:80dvw;box-shadow:0 8px 16px var(--sui-popup-shadow-color);opacity:1;transition-duration:250ms;will-change:opacity;}.toast[aria-hidden=true].svelte-1avsans {display:block;opacity:0;}.toast.top-left.svelte-1avsans {inset-block-start:0;inset-block-end:auto;inset-inline-start:0;inset-inline-end:auto;}.toast.top-center.svelte-1avsans {inset-block-start:0;inset-block-end:auto;inset-inline-start:50%;inset-inline-end:auto;}.toast.top-center.svelte-1avsans:dir(ltr) {transform:translateX(-50%);}.toast.top-center.svelte-1avsans:dir(rtl) {transform:translateX(50%);}.toast.top-right.svelte-1avsans {inset-block-start:0;inset-block-end:auto;inset-inline-start:auto;inset-inline-end:0;}.toast.bottom-left.svelte-1avsans {inset-block-start:auto;inset-block-end:0;inset-inline-start:0;inset-inline-end:auto;}.toast.bottom-center.svelte-1avsans {inset-block-start:auto;inset-block-end:0;inset-inline-start:50%;inset-inline-end:auto;}.toast.bottom-center.svelte-1avsans:dir(ltr) {transform:translateX(-50%);}.toast.bottom-center.svelte-1avsans:dir(rtl) {transform:translateX(50%);}.toast.bottom-right.svelte-1avsans {inset-block-start:auto;inset-block-end:0;inset-inline-start:auto;inset-inline-end:0;}"};function nr(t,e){ae(e,!0),ke(t,VK);let n=N(e,"show",15,!1),r=N(e,"id",3,void 0),i=N(e,"duration",3,5e3),o=N(e,"position",7,"auto"),a=ot(e,["$$slots","$$events","$$legacy","show","id","duration","position","children"]),s=ie(void 0),l=ie(void 0),u=ie(void 0),d=ie(0);Vt(()=>(V(l,document.querySelector(".sui.toast-base.enabled")??void 0,!0),c(l)?c(s)?.remove():(V(l,c(s),!0),c(l)&&(c(l).classList.add("enabled"),(document.querySelector(".sui.app-shell")??document.body).appendChild(c(l)),c(l).showPopover&&(c(l).popover="manual",c(l).showPopover()))),()=>{c(u)?.remove()})),Vt(()=>{if(o()==="auto"){const m=globalThis.matchMedia("(width < 1024px)"),v=()=>{o(m.matches?"bottom-center":`bottom-${document.dir==="rtl"?"left":"right"}`)};v(),m.addEventListener("change",v)}}),ze(()=>{c(l)&&c(u)&&c(l).appendChild(c(u))}),ze(()=>{r(),n(),i(),xe(()=>{globalThis.clearTimeout(c(d))}),n()&&i()&&V(d,globalThis.setTimeout(()=>{n(!1)},i()),!0)});var f=KK(),h=M(f);St(h,m=>V(s,m),()=>c(s));var p=z(h,2);mt(p,()=>({...a,class:`sui toast ${o()??""}`,"aria-hidden":!n()}),void 0,void 0,void 0,"svelte-1avsans");var g=F(p);Ue(g,()=>e.children??He),St(p,m=>V(u,m),()=>c(u)),S(t,f),se()}function Be(t,...e){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",t);for(const i of e)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function mL(t,...e){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",t);for(const i of e)r.append("v",i);n.search=r.toString(),console.warn(`Minified Lexical warning #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const Wo=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,GK=Wo&&"documentMode"in document?document.documentMode:null,$o=Wo&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Wl=Wo&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Ig=!(!Wo||!("InputEvent"in window)||GK)&&"getTargetRanges"in new window.InputEvent("input"),th=Wo&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),Nu=Wo&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,WK=Wo&&/Android/.test(navigator.userAgent),vL=Wo&&/^(?=.*Chrome).*/i.test(navigator.userAgent),uE=Wo&&WK&&vL,nh=Wo&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&$o&&!vL;function _L(...t){const e=[];for(const n of t)if(n&&typeof n=="string")for(const[r]of n.matchAll(/\S+/g))e.push(r);return e}const YK=0,JK=1,XK=2,bL=128,ZK=1,QK=2,eV=3,tV=4,nV=5,rV=6,ev=th||Nu||nh?" ":"",js=`
|
|
373
|
+
|
|
374
|
+
`,iV=Wl?" ":ev,yL="֑-߿יִ-﷽ﹰ-ﻼ",wL="A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--",oV=new RegExp("^[^"+wL+"]*["+yL+"]"),aV=new RegExp("^[^"+yL+"]*["+wL+"]"),Yl={bold:1,capitalize:1024,code:16,highlight:bL,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},sV={directionless:1,unmergeable:2},dE={center:2,end:6,justify:4,left:1,right:3,start:5},lV={[QK]:"center",[rV]:"end",[tV]:"justify",[ZK]:"left",[eV]:"right",[nV]:"start"},cV={normal:0,segmented:2,token:1},uV={[YK]:"normal",[XK]:"segmented",[JK]:"token"},fE="$config";function xL(t,e,n,r,i,o){let a=t.getFirstChild();for(;a!==null;){const s=a.__key;a.__parent===e&&(we(a)&&xL(a,s,n,r,i,o),n.has(s)||o.delete(s),i.push(s)),a=a.getNextSibling()}}let xy=!1,x0=0;function dV(t){x0=t.timeStamp}function v_(t,e,n){const r=t.nodeName==="BR",i=e.__lexicalLineBreak;return i&&(t===i||r&&t.previousSibling===i)||r&&lv(t,n)!==void 0}function fV(t,e,n){const r=Bo(bo(n));let i=null,o=null;r!==null&&r.anchorNode===t&&(i=r.anchorOffset,o=r.focusOffset);const a=t.nodeValue;a!==null&&j0(e,a,i,o,!1)}function hV(t,e,n){if(De(t)){const r=t.anchor.getNode();if(r.is(n)&&t.format!==r.getFormat())return!1}return us(e)&&n.isAttached()}function pV(t,e,n,r){for(let i=t;i&&!v9(i);i=Wh(i)){const o=lv(i,e);if(o!==void 0){const a=qn(o,n);if(a)return Gt(a)||!In(i)?void 0:[i,a]}else if(i===r)return[r,bI(n)]}}function kL(t,e,n){xy=!0;const r=performance.now()-x0>100;try{Ui(t,()=>{const i=Ge()||(function(h){return h.getEditorState().read(()=>{const p=Ge();return p!==null?p.clone():null})})(t),o=new Map,a=t.getRootElement(),s=t._editorState,l=t._blockCursorElement;let u=!1,d="";for(let h=0;h<e.length;h++){const p=e[h],g=p.type,m=p.target,v=pV(m,t,s,a);if(!v)continue;const[b,y]=v;if(g==="characterData")r&&Ye(y)&&us(m)&&hV(i,m,y)&&fV(m,y,t);else if(g==="childList"){u=!0;const w=p.addedNodes;for(let $=0;$<w.length;$++){const A=w[$],k=vI(A),T=A.parentNode;if(T!=null&&A!==l&&k===null&&!v_(A,T,t)){if(Wl){const C=(In(A)?A.innerText:null)||A.nodeValue;C&&(d+=C)}T.removeChild(A)}}const x=p.removedNodes,E=x.length;if(E>0){let $=0;for(let A=0;A<E;A++){const k=x[A];(v_(k,m,t)||l===k)&&(m.appendChild(k),$++)}E!==$&&o.set(b,y)}}}if(o.size>0)for(const[h,p]of o)p.reconcileObservedMutation(h,t);const f=n.takeRecords();if(f.length>0){for(let h=0;h<f.length;h++){const p=f[h],g=p.addedNodes,m=p.target;for(let v=0;v<g.length;v++){const b=g[v],y=b.parentNode;y==null||b.nodeName!=="BR"||v_(b,m,t)||y.removeChild(b)}}n.takeRecords()}i!==null&&(u&&Br(i),Wl&&kI(t)&&i.insertRawText(d))})}finally{xy=!1}}function SL(t){const e=t._observer;e!==null&&kL(t,e.takeRecords(),e)}function EL(t){(function(e){x0===0&&bo(e).addEventListener("textInput",dV,!0)})(t),t._observer=new MutationObserver((e,n)=>{kL(t,e,n)})}let gV=class{key;parse;unparse;isEqual;defaultValue;constructor(e,n){this.key=e,this.parse=n.parse.bind(n),this.unparse=(n.unparse||bV).bind(n),this.isEqual=(n.isEqual||Object.is).bind(n),this.defaultValue=this.parse(void 0)}};function mV(t,e){return new gV(t,e)}function TL(t,e,n="latest"){const r=(n==="latest"?t.getLatest():t).__state;return r?r.getValue(e):e.defaultValue}function __(t,e,n){let r;if(Tr(),typeof n=="function"){const o=t.getLatest(),a=TL(o,e);if(r=n(a),e.isEqual(a,r))return o}else r=n;const i=t.getWritable();return AL(i).updateFromKnown(e,r),i}function vV(t){const e=new Map,n=new Set;for(let r=typeof t=="function"?t:t.replace;r.prototype&&r.prototype.getType!==void 0;r=Object.getPrototypeOf(r)){const{ownNodeConfig:i}=uv(r);if(i&&i.stateConfigs)for(const o of i.stateConfigs){let a;"stateConfig"in o?(a=o.stateConfig,o.flat&&n.add(a.key)):a=o,e.set(a.key,a)}}return{flatKeys:n,sharedConfigMap:e}}let _V=class $L{node;knownState;unknownState;sharedNodeState;size;constructor(e,n,r=void 0,i=new Map,o=void 0){this.node=e,this.sharedNodeState=n,this.unknownState=r,this.knownState=i;const{sharedConfigMap:a}=this.sharedNodeState,s=o!==void 0?o:(function(l,u,d){let f=d.size;if(u)for(const h in u){const p=l.get(h);p&&d.has(p)||f++}return f})(a,r,i);this.size=s}getValue(e){const n=this.knownState.get(e);if(n!==void 0)return n;this.sharedNodeState.sharedConfigMap.set(e.key,e);let r=e.defaultValue;if(this.unknownState&&e.key in this.unknownState){const i=this.unknownState[e.key];i!==void 0&&(r=e.parse(i)),this.updateFromKnown(e,r)}return r}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){const e={...this.unknownState},n={};for(const[r,i]of this.knownState)r.isEqual(i,r.defaultValue)?delete e[r.key]:e[r.key]=r.unparse(i);for(const r of this.sharedNodeState.flatKeys)r in e&&(n[r]=e[r],delete e[r]);return hE(e)&&(n.$=e),n}getWritable(e){if(this.node===e)return this;const{sharedNodeState:n,unknownState:r}=this,i=new Map(this.knownState);return new $L(e,n,(function(o,a,s){let l;if(s)for(const[u,d]of Object.entries(s)){const f=o.get(u);f?a.has(f)||a.set(f,f.parse(d)):(l=l||{},l[u]=d)}return l})(n.sharedConfigMap,i,r),i,this.size)}updateFromKnown(e,n){const r=e.key;this.sharedNodeState.sharedConfigMap.set(r,e);const{knownState:i,unknownState:o}=this;i.has(e)||o&&r in o||(o&&(delete o[r],this.unknownState=hE(o)),this.size++),i.set(e,n)}updateFromUnknown(e,n){const r=this.sharedNodeState.sharedConfigMap.get(e);r?this.updateFromKnown(r,r.parse(n)):(this.unknownState=this.unknownState||{},e in this.unknownState||this.size++,this.unknownState[e]=n)}updateFromJSON(e){const{knownState:n}=this;for(const r of n.keys())n.set(r,r.defaultValue);if(this.size=n.size,this.unknownState=void 0,e)for(const[r,i]of Object.entries(e))this.updateFromUnknown(r,i)}};function AL(t){const e=t.getWritable(),n=e.__state?e.__state.getWritable(e):new _V(e,CL(e));return e.__state=n,n}function CL(t){return t.__state?t.__state.sharedNodeState:gI(Yh(),t.getType()).sharedNodeState}function hE(t){if(t)for(const e in t)return t}function bV(t){return t}function pE(t,e,n){for(const[r,i]of e.knownState){if(t.has(r.key))continue;t.add(r.key);const o=n?n.getValue(r):r.defaultValue;if(o!==i&&!r.isEqual(o,i))return!0}return!1}function gE(t,e,n){const{unknownState:r}=e,i=n?n.unknownState:void 0;if(r){for(const[o,a]of Object.entries(r))if(!t.has(o)&&(t.add(o),a!==(i?i[o]:void 0)))return!0}return!1}function mE(t,e){const n=t.__state;return n&&n.node===t?n.getWritable(e):n}function vE(t,e){const n=t.__mode,r=t.__format,i=t.__style,o=e.__mode,a=e.__format,s=e.__style,l=t.__state,u=e.__state;return(n===null||n===o)&&(r===null||r===a)&&(i===null||i===s)&&(t.__state===null||l===u||(function(d,f){if(d===f)return!0;if(d&&f&&d.size!==f.size)return!1;const h=new Set;return!(d&&pE(h,d,f)||f&&pE(h,f,d)||d&&gE(h,d,f)||f&&gE(h,f,d))})(l,u))}function _E(t,e){const n=t.mergeWithSibling(e),r=Vn()._normalizedNodes;return r.add(t.__key),r.add(e.__key),n}function bE(t){let e,n,r=t;if(r.__text!==""||!r.isSimpleText()||r.isUnmergeable()){for(;(e=r.getPreviousSibling())!==null&&Ye(e)&&e.isSimpleText()&&!e.isUnmergeable();){if(e.__text!==""){if(vE(e,r)){r=_E(e,r);break}break}e.remove()}for(;(n=r.getNextSibling())!==null&&Ye(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(n.__text!==""){if(vE(r,n)){r=_E(r,n);break}break}n.remove()}}else r.remove()}function Ru(t){return yE(t.anchor),yE(t.focus),t}function yE(t){for(;t.type==="element";){const e=t.getNode(),n=t.offset;let r,i;if(n===e.getChildrenSize()?(r=e.getChildAtIndex(n-1),i=!0):(r=e.getChildAtIndex(n),i=!1),Ye(r)){t.set(r.__key,i?r.getTextContentSize():0,"text",!0);break}if(!we(r))break;t.set(r.__key,i?r.getChildrenSize():0,"element",!0)}}let Jl,Xr,rh,tv,ky,Sy,Xl,Mo,Ey,ih,vr="",Qo=null,ea="",Da="",Hc=!1,Ng=!1;function Rg(t,e){const n=Xl.get(t);if(e!==null){const r=Cy(t);r.parentNode===e&&e.removeChild(r)}if(Mo.has(t)||Xr._keyToDOMMap.delete(t),we(n)){const r=Dg(n,Xl);Ty(r,0,r.length-1,null)}n!==void 0&&U0(ih,rh,tv,n,"destroyed")}function Ty(t,e,n,r){let i=e;for(;i<=n;++i){const o=t[i];o!==void 0&&Rg(o,r)}}function al(t,e){t.setProperty("text-align",e)}const yV="40px";function PL(t,e){const n=Jl.theme.indent;if(typeof n=="string"){const i=t.classList.contains(n);e>0&&!i?t.classList.add(n):e<1&&i&&t.classList.remove(n)}const r=getComputedStyle(t).getPropertyValue("--lexical-indent-base-value")||yV;t.style.setProperty("padding-inline-start",e===0?"":`calc(${e} * ${r})`)}function OL(t,e){const n=t.style;e===0?al(n,""):e===1?al(n,"left"):e===2?al(n,"center"):e===3?al(n,"right"):e===4?al(n,"justify"):e===5?al(n,"start"):e===6&&al(n,"end")}function $y(t,e){const n=(function(r){const i=r.__dir;if(i!==null)return i;if(ur(r))return null;const o=r.getParentOrThrow();return ur(o)&&o.__dir===null?"auto":null})(e);n!==null?t.dir=n:t.removeAttribute("dir")}function Mg(t,e){const n=Mo.get(t);n===void 0&&Be(60);const r=n.createDOM(Jl,Xr);if((function(i,o,a){const s=a._keyToDOMMap;(function(l,u,d){const f=`__lexicalKey_${u._key}`;l[f]=d})(o,a,i),s.set(i,o)})(t,r,Xr),Ye(n)?r.setAttribute("data-lexical-text","true"):Gt(n)&&r.setAttribute("data-lexical-decorator","true"),we(n)){const i=n.__indent,o=n.__size;if($y(r,n),i!==0&&PL(r,i),o!==0){const s=o-1;Ay(Dg(n,Mo),n,0,s,n.getDOMSlot(r))}const a=n.__format;a!==0&&OL(r,a),n.isInline()||LL(null,n,r),cv(n)&&(vr+=js,Da+=js)}else{const i=n.getTextContent();if(Gt(n)){const o=n.decorate(Xr,Jl);o!==null&&IL(t,o),r.contentEditable="false"}vr+=i,Da+=i}return e!==null&&e.insertChild(r),U0(ih,rh,tv,n,"created"),r}function Ay(t,e,n,r,i){const o=vr;vr="";let a=n;for(;a<=r;++a){Mg(t[a],i);const s=Mo.get(t[a]);s!==null&&Ye(s)&&(Qo===null&&(Qo=s.getFormat()),ea===""&&(ea=s.getStyle()))}cv(e)&&(vr+=js),i.element.__lexicalTextContent=vr,vr=o+vr}function wE(t,e){if(t){const n=t.__last;if(n){const r=e.get(n);if(r)return Bn(r)?"line-break":Gt(r)&&r.isInline()?"decorator":null}return"empty"}return null}function LL(t,e,n){const r=wE(t,Xl),i=wE(e,Mo);r!==i&&e.getDOMSlot(n).setManagedLineBreak(i)}function wV(t,e,n){var r;Qo=null,ea="",(function(i,o,a){const s=vr,l=i.__size,u=o.__size;vr="";const d=a.element;if(l===1&&u===1){const f=i.__first,h=o.__first;if(f===h)lf(f,d);else{const g=Cy(f),m=Mg(h,null);try{d.replaceChild(m,g)}catch(v){if(typeof v=="object"&&v!=null){const b=`${v.toString()} Parent: ${d.tagName}, new child: {tag: ${m.tagName} key: ${h}}, old child: {tag: ${g.tagName}, key: ${f}}.`;throw new Error(b)}throw v}Rg(f,null)}const p=Mo.get(h);Ye(p)&&(Qo===null&&(Qo=p.getFormat()),ea===""&&(ea=p.getStyle()))}else{const f=Dg(i,Xl),h=Dg(o,Mo);if(f.length!==l&&Be(227),h.length!==u&&Be(228),l===0)u!==0&&Ay(h,o,0,u-1,a);else if(u===0){if(l!==0){const p=a.after==null&&a.before==null&&a.element.__lexicalLineBreak==null;Ty(f,0,l-1,p?null:d),p&&(d.textContent="")}}else(function(p,g,m,v,b,y){const w=v-1,x=b-1;let E,$,A=y.getFirstChild(),k=0,T=0;for(;k<=w&&T<=x;){const O=g[k],I=m[T];if(O===I)A=b_(lf(I,y.element)),k++,T++;else{E===void 0&&(E=new Set(g)),$===void 0&&($=new Set(m));const D=$.has(O),B=E.has(I);if(D)if(B){const K=Zl(Xr,I);K===A?A=b_(lf(I,y.element)):(y.withBefore(A).insertChild(K),lf(I,y.element)),k++,T++}else Mg(I,y.withBefore(A)),T++;else A=b_(Cy(O)),Rg(O,y.element),k++}const L=Mo.get(I);L!==null&&Ye(L)&&(Qo===null&&(Qo=L.getFormat()),ea===""&&(ea=L.getStyle()))}const C=k>w,P=T>x;if(C&&!P){const O=m[x+1],I=O===void 0?null:Xr.getElementByKey(O);Ay(m,p,T,x,y.withBefore(I))}else P&&!C&&Ty(g,k,w,y.element)})(o,f,h,l,u,a)}cv(o)&&(vr+=js),d.__lexicalTextContent=vr,vr=s+vr})(t,e,e.getDOMSlot(n)),r=e,Qo==null||Qo===r.__textFormat||Ng||r.setTextFormat(Qo),(function(i){ea===""||ea===i.__textStyle||Ng||i.setTextStyle(ea)})(e)}function Dg(t,e){const n=[];let r=t.__first;for(;r!==null;){const i=e.get(r);i===void 0&&Be(101),n.push(r),r=i.__next}return n}function lf(t,e){const n=Xl.get(t);let r=Mo.get(t);n!==void 0&&r!==void 0||Be(61);const i=Hc||Sy.has(t)||ky.has(t),o=Zl(Xr,t);if(n===r&&!i){if(we(n)){const a=o.__lexicalTextContent;a!==void 0&&(vr+=a,Da+=a)}else{const a=n.getTextContent();Da+=a,vr+=a}return o}if(n!==r&&i&&U0(ih,rh,tv,r,"updated"),r.updateDOM(n,o,Jl)){const a=Mg(t,null);return e===null&&Be(62),e.replaceChild(a,o),Rg(t,null),a}if(we(n)&&we(r)){const a=r.__indent;(Hc||a!==n.__indent)&&PL(o,a);const s=r.__format;if((Hc||s!==n.__format)&&OL(o,s),i&&(wV(n,r,o),ur(r)||r.isInline()||LL(n,r,o)),cv(r)&&(vr+=js,Da+=js),(Hc||r.__dir!==n.__dir)&&($y(o,r),ur(r)&&!Hc))for(const l of r.getChildren())we(l)&&$y(Zl(Xr,l.getKey()),l)}else{const a=r.getTextContent();if(Gt(r)){const s=r.decorate(Xr,Jl);s!==null&&IL(t,s)}vr+=a,Da+=a}if(!Ng&&ur(r)&&r.__cachedText!==Da){const a=r.getWritable();a.__cachedText=Da,r=a}return o}function IL(t,e){let n=Xr._pendingDecorators;const r=Xr._decorators;if(n===null){if(r[t]===e)return;n=_I(Xr)}n[t]=e}function b_(t){let e=t.nextSibling;return e!==null&&e===Xr._blockCursorElement&&(e=e.nextSibling),e}function xV(t,e,n,r,i,o){vr="",Da="",Hc=r===2,Xr=n,Jl=n._config,rh=n._nodes,tv=Xr._listeners.mutation,ky=i,Sy=o,Xl=t._nodeMap,Mo=e._nodeMap,Ng=e._readOnly,Ey=new Map(n._keyToDOMMap);const a=new Map;return ih=a,lf("root",null),Xr=void 0,rh=void 0,ky=void 0,Sy=void 0,Xl=void 0,Mo=void 0,Jl=void 0,Ey=void 0,ih=void 0,a}function Cy(t){const e=Ey.get(t);return e===void 0&&Be(75,t),e}function gt(t){return{type:t}}const NL=gt("SELECTION_CHANGE_COMMAND"),kV=gt("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),RL=gt("CLICK_COMMAND"),$l=gt("DELETE_CHARACTER_COMMAND"),iu=gt("INSERT_LINE_BREAK_COMMAND"),oh=gt("INSERT_PARAGRAPH_COMMAND"),ou=gt("CONTROLLED_TEXT_INSERTION_COMMAND"),k0=gt("PASTE_COMMAND"),Py=gt("REMOVE_TEXT_COMMAND"),ah=gt("DELETE_WORD_COMMAND"),sh=gt("DELETE_LINE_COMMAND"),Ua=gt("FORMAT_TEXT_COMMAND"),S0=gt("UNDO_COMMAND"),E0=gt("REDO_COMMAND"),ML=gt("KEYDOWN_COMMAND"),DL=gt("KEY_ARROW_RIGHT_COMMAND"),Oy=gt("MOVE_TO_END"),FL=gt("KEY_ARROW_LEFT_COMMAND"),Fg=gt("MOVE_TO_START"),Mu=gt("KEY_ARROW_UP_COMMAND"),zg=gt("KEY_ARROW_DOWN_COMMAND"),jg=gt("KEY_ENTER_COMMAND"),zL=gt("KEY_SPACE_COMMAND"),jL=gt("KEY_BACKSPACE_COMMAND"),UL=gt("KEY_ESCAPE_COMMAND"),BL=gt("KEY_DELETE_COMMAND"),T0=gt("KEY_TAB_COMMAND"),Ly=gt("INSERT_TAB_COMMAND"),Os=gt("INDENT_CONTENT_COMMAND"),_l=gt("OUTDENT_CONTENT_COMMAND"),qL=gt("DROP_COMMAND"),SV=gt("FORMAT_ELEMENT_COMMAND"),HL=gt("DRAGSTART_COMMAND"),KL=gt("DRAGOVER_COMMAND"),EV=gt("DRAGEND_COMMAND"),nv=gt("COPY_COMMAND"),$0=gt("CUT_COMMAND"),Iy=gt("SELECT_ALL_COMMAND"),TV=gt("CLEAR_EDITOR_COMMAND"),$V=gt("CLEAR_HISTORY_COMMAND"),Ep=gt("CAN_REDO_COMMAND"),Tp=gt("CAN_UNDO_COMMAND"),AV=gt("FOCUS_COMMAND"),CV=gt("BLUR_COMMAND"),PV=gt("KEY_MODIFIER_COMMAND"),Pa=Object.freeze({}),Ny=[["keydown",function(t,e){if(Ef=t.timeStamp,VL=t.key,!e.isComposing()&&!tt(e,ML,t)&&t.key!=null){if(y_&&YE(t))return Ui(e,()=>{$p(e,w_)}),y_=!1,void(w_="");if((function(n){return an(n,"ArrowRight",{shiftKey:"any"})})(t))tt(e,DL,t);else if((function(n){return an(n,"ArrowRight",Ia)})(t))tt(e,Oy,t);else if((function(n){return an(n,"ArrowLeft",{shiftKey:"any"})})(t))tt(e,FL,t);else if((function(n){return an(n,"ArrowLeft",Ia)})(t))tt(e,Fg,t);else if((function(n){return an(n,"ArrowUp",{altKey:"any",shiftKey:"any"})})(t))tt(e,Mu,t);else if((function(n){return an(n,"ArrowDown",{altKey:"any",shiftKey:"any"})})(t))tt(e,zg,t);else if((function(n){return an(n,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0})})(t))Tf=!0,tt(e,jg,t);else if((function(n){return n.key===" "})(t))tt(e,zL,t);else if((function(n){return $o&&an(n,"o",{ctrlKey:!0})})(t))t.preventDefault(),Tf=!0,tt(e,iu,!0);else if((function(n){return an(n,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"})})(t))Tf=!1,tt(e,jg,t);else if((function(n){return an(n,"Backspace",{shiftKey:"any"})||$o&&an(n,"h",{ctrlKey:!0})})(t))YE(t)?tt(e,jL,t):(t.preventDefault(),tt(e,$l,!0));else if((function(n){return n.key==="Escape"})(t))tt(e,UL,t);else if((function(n){return an(n,"Delete",{})||$o&&an(n,"d",{ctrlKey:!0})})(t))(function(n){return n.key==="Delete"})(t)?tt(e,BL,t):(t.preventDefault(),tt(e,$l,!1));else if((function(n){return an(n,"Backspace",WE)})(t))t.preventDefault(),tt(e,ah,!0);else if((function(n){return an(n,"Delete",WE)})(t))t.preventDefault(),tt(e,ah,!1);else if((function(n){return $o&&an(n,"Backspace",{metaKey:!0})})(t))t.preventDefault(),tt(e,sh,!0);else if((function(n){return $o&&(an(n,"Delete",{metaKey:!0})||an(n,"k",{ctrlKey:!0}))})(t))t.preventDefault(),tt(e,sh,!1);else if((function(n){return an(n,"b",Ia)})(t))t.preventDefault(),tt(e,Ua,"bold");else if((function(n){return an(n,"u",Ia)})(t))t.preventDefault(),tt(e,Ua,"underline");else if((function(n){return an(n,"i",Ia)})(t))t.preventDefault(),tt(e,Ua,"italic");else if((function(n){return an(n,"Tab",{shiftKey:"any"})})(t))tt(e,T0,t);else if((function(n){return an(n,"z",Ia)})(t))t.preventDefault(),tt(e,S0,void 0);else if((function(n){return $o?an(n,"z",{metaKey:!0,shiftKey:!0}):an(n,"y",{ctrlKey:!0})||an(n,"z",{ctrlKey:!0,shiftKey:!0})})(t))t.preventDefault(),tt(e,E0,void 0);else{const n=e._editorState._selection;n===null||De(n)?JE(t)&&(t.preventDefault(),tt(e,Iy,t)):(function(r){return an(r,"c",Ia)})(t)?(t.preventDefault(),tt(e,nv,t)):(function(r){return an(r,"x",Ia)})(t)?(t.preventDefault(),tt(e,$0,t)):JE(t)&&(t.preventDefault(),tt(e,Iy,t))}(function(n){return n.ctrlKey||n.shiftKey||n.altKey||n.metaKey})(t)&&tt(e,PV,t)}}],["pointerdown",function(t,e){const n=t.target,r=t.pointerType;kd(n)&&r!=="touch"&&r!=="pen"&&t.button===0&&Ui(e,()=>{KE(n)||(Dy=!0)})}],["compositionstart",function(t,e){Ui(e,()=>{const n=Ge();if(De(n)&&!e.isComposing()){const r=n.anchor,i=n.anchor.getNode();Ir(r.key),(t.timeStamp<Ef+30||r.type==="element"||!n.isCollapsed()||i.getFormat()!==n.format||Ye(i)&&i.getStyle()!==n.style)&&tt(e,ou,iV)}})}],["compositionend",function(t,e){Wl?Bd=!0:Nu||!th&&!nh?Ui(e,()=>{$p(e,t.data)}):(y_=!0,w_=t.data)}],["input",function(t,e){t.stopPropagation(),Ui(e,()=>{if(In(t.target)&&KE(t.target))return;const n=Ge(),r=t.data,i=XL(t);if(r!=null&&De(n)&&YL(n,i,r,t.timeStamp,!1)){Bd&&($p(e,r),Bd=!1);const o=n.anchor.getNode(),a=Bo(bo(e));if(a===null)return;const s=n.isBackward(),l=s?n.anchor.offset:n.focus.offset,u=s?n.focus.offset:n.anchor.offset;Ig&&!n.isCollapsed()&&Ye(o)&&a.anchorNode!==null&&o.getTextContent().slice(0,l)+r+o.getTextContent().slice(l+u)===xI(a.anchorNode)||tt(e,ou,r);const d=r.length;Wl&&d>1&&t.inputType==="insertCompositionText"&&!e.isComposing()&&(n.anchor.offset-=d),th||Nu||nh||!e.isComposing()||(Ef=0,Ir(null))}else z0(!1,e,r!==null?r:void 0),Bd&&($p(e,r||void 0),Bd=!1);(function(){Tr();const o=Vn();SL(o)})()},{event:t}),Kc=null}],["click",function(t,e){Ui(e,()=>{const n=Ge(),r=Bo(bo(e)),i=wc();if(r){if(De(n)){const o=n.anchor,a=o.getNode();if(o.type==="element"&&o.offset===0&&n.isCollapsed()&&!ur(a)&&ar().getChildrenSize()===1&&a.getTopLevelElementOrThrow().isEmpty()&&i!==null&&n.is(i))r.removeAllRanges(),n.dirty=!0;else if(t.detail===3&&!n.isCollapsed()&&a!==n.focus.getNode()){const s=pi(a,l=>we(l)&&!l.isInline());we(s)&&s.select(0)}}else if(t.pointerType==="touch"||t.pointerType==="pen"){const o=r.anchorNode;(In(o)||us(o))&&Br(C0(i,r,e,t))}}tt(e,RL,t)})}],["cut",Pa],["copy",Pa],["dragstart",Pa],["dragover",Pa],["dragend",Pa],["paste",Pa],["focus",Pa],["blur",Pa],["drop",Pa]];Ig&&Ny.push(["beforeinput",(t,e)=>(function(n,r){const i=n.inputType,o=XL(n);i==="deleteCompositionText"||Wl&&kI(r)||i!=="insertCompositionText"&&Ui(r,()=>{const a=Ge();if(i==="deleteContentBackward"){if(a===null){const p=wc();if(!De(p))return;Br(p.clone())}if(De(a)){const p=a.anchor.key===a.focus.key;if(s=n.timeStamp,VL==="MediaLast"&&s<Ef+30&&r.isComposing()&&p){if(Ir(null),Ef=0,setTimeout(()=>{Ui(r,()=>{Ir(null)})},30),De(a)){const g=a.anchor.getNode();g.markDirty(),Ye(g)||Be(142),JL(a,g)}}else{Ir(null),n.preventDefault();const g=a.anchor.getNode(),m=g.getTextContent(),v=g.canInsertTextAfter(),b=a.anchor.offset===0&&a.focus.offset===m.length;let y=uE&&p&&!b&&v;if(y&&a.isCollapsed()&&(y=!Gt(qy(a.anchor,!0))),!y){tt(r,$l,!0);const w=Ge();uE&&De(w)&&w.isCollapsed()&&(fl=w,setTimeout(()=>fl=null))}}return}}var s;if(!De(a))return;const l=n.data;Kc!==null&&z0(!1,r,Kc),a.dirty&&Kc===null||!a.isCollapsed()||ur(a.anchor.getNode())||o===null||a.applyDOMRange(o),Kc=null;const u=a.anchor,d=a.focus,f=u.getNode(),h=d.getNode();if(i!=="insertText"&&i!=="insertTranspose")switch(n.preventDefault(),i){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":tt(r,ou,n);break;case"insertFromComposition":Ir(null),tt(r,ou,n);break;case"insertLineBreak":Ir(null),tt(r,iu,!1);break;case"insertParagraph":Ir(null),Tf&&!Nu?(Tf=!1,tt(r,iu,!1)):tt(r,oh,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":tt(r,k0,n);break;case"deleteByComposition":(function(p,g){return p!==g||we(p)||we(g)||!Al(p)||!Al(g)})(f,h)&&tt(r,Py,n);break;case"deleteByDrag":case"deleteByCut":tt(r,Py,n);break;case"deleteContent":tt(r,$l,!1);break;case"deleteWordBackward":tt(r,ah,!0);break;case"deleteWordForward":tt(r,ah,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":tt(r,sh,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":tt(r,sh,!1);break;case"formatStrikeThrough":tt(r,Ua,"strikethrough");break;case"formatBold":tt(r,Ua,"bold");break;case"formatItalic":tt(r,Ua,"italic");break;case"formatUnderline":tt(r,Ua,"underline");break;case"historyUndo":tt(r,S0,void 0);break;case"historyRedo":tt(r,E0,void 0)}else{if(l===`
|
|
375
375
|
`)n.preventDefault(),tt(r,iu,!1);else if(l===js)n.preventDefault(),tt(r,oh,void 0);else if(l==null&&n.dataTransfer){const p=n.dataTransfer.getData("text/plain");n.preventDefault(),a.insertRawText(p)}else l!=null&&YL(a,o,l,n.timeStamp,!0)?(n.preventDefault(),tt(r,ou,l)):Kc=l;GL=n.timeStamp}})})(t,e)]);let Ef=0,VL=null,GL=0,Kc=null;const Ry=new WeakMap,Ug=new WeakMap;let My=!1,Dy=!1,Tf=!1,Bd=!1,y_=!1,w_="",fl=null,WL=[0,"",0,"root",0];function YL(t,e,n,r,i){const o=t.anchor,a=t.focus,s=o.getNode(),l=Vn(),u=Bo(bo(l)),d=u!==null?u.anchorNode:null,f=o.key,h=l.getElementByKey(f),p=n.length;return f!==a.key||!Ye(s)||(!i&&(!Ig||GL<r+50)||s.isDirty()&&p<2||yI(n))&&o.offset!==a.offset&&!s.isComposing()||Ra(s)||s.isDirty()&&p>1||(i||!Ig)&&h!==null&&!s.isComposing()&&d!==Fu(h)||u!==null&&e!==null&&(!e.collapsed||e.startContainer!==u.anchorNode||e.startOffset!==u.anchorOffset)||s.getFormat()!==t.format||s.getStyle()!==t.style||(function(g,m){if(m.isSegmented())return!0;if(!g.isCollapsed())return!1;const v=g.anchor.offset,b=m.getParentOrThrow(),y=Al(m);return v===0?!m.canInsertTextBefore()||!b.canInsertTextBefore()&&!m.isComposing()||y||(function(w){const x=w.getPreviousSibling();return(Ye(x)||we(x)&&x.isInline())&&!x.canInsertTextAfter()})(m):v===m.getTextContentSize()&&(!m.canInsertTextAfter()||!b.canInsertTextAfter()&&!m.isComposing()||y)})(t,s)}function xE(t,e){return us(t)&&t.nodeValue!==null&&e!==0&&e!==t.nodeValue.length}function kE(t,e,n){const{anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:a}=t;My&&(My=!1,xE(r,i)&&xE(o,a)&&!fl)||Ui(e,()=>{if(!n)return void Br(null);if(!Gh(e,r,o))return;let s=Ge();if(fl&&De(s)&&s.isCollapsed()){const l=s.anchor,u=fl.anchor;(l.key===u.key&&l.offset===u.offset+1||l.offset===1&&u.getNode().is(l.getNode().getPreviousSibling()))&&(s=fl.clone(),Br(s))}if(fl=null,De(s)){const l=s.anchor,u=l.getNode();if(s.isCollapsed()){t.type==="Range"&&t.anchorNode===t.focusNode&&(s.dirty=!0);const d=bo(e).event,f=d?d.timeStamp:performance.now(),[h,p,g,m,v]=WL,b=ar(),y=e.isComposing()===!1&&b.getTextContent()==="";if(f<v+200&&l.offset===g&&l.key===m)tg(s,h,p);else if(l.type==="text")Ye(u)||Be(141),JL(s,u);else if(l.type==="element"&&!y){we(u)||Be(259);const w=l.getNode();w.isEmpty()?(function(x,E){const $=E.getTextFormat(),A=E.getTextStyle();tg(x,$,A)})(s,w):tg(s,0,"")}}else{const d=l.key,f=s.focus.key,h=s.getNodes(),p=h.length,g=s.isBackward(),m=g?a:i,v=g?i:a,b=g?f:d,y=g?d:f;let w=2047,x=!1;for(let E=0;E<p;E++){const $=h[E],A=$.getTextContentSize();if(Ye($)&&A!==0&&!(E===0&&$.__key===b&&m===A||E===p-1&&$.__key===y&&v===0)&&(x=!0,w&=$.getFormat(),w===0))break}s.format=x?w:0}}tt(e,NL,void 0)})}function tg(t,e,n){t.format===e&&t.style===n||(t.format=e,t.style=n,t.dirty=!0)}function JL(t,e){tg(t,e.getFormat(),e.getStyle())}function XL(t){if(!t.getTargetRanges)return null;const e=t.getTargetRanges();return e.length===0?null:e[0]}function $p(t,e){const n=t._compositionKey;if(Ir(null),n!==null&&e!=null){if(e===""){const r=qn(n),i=Fu(t.getElementByKey(n));return void(i!==null&&i.nodeValue!==null&&Ye(r)&&j0(r,i.nodeValue,null,null,!0))}if(e[e.length-1]===`
|
|
376
|
-
`){const r=Ge();if(De(r)){const i=r.focus;return r.anchor.set(i.key,i.offset,i.type),void tt(t,jg,null)}}}z0(!0,t,e)}function ZL(t){let e=t.__lexicalEventHandles;return e===void 0&&(e=[],t.__lexicalEventHandles=e),e}const au=new Map;function QL(t){const e=
|
|
377
|
-
`}createDOM(){return document.createElement("br")}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:e=>(function(n){const r=n.parentElement;if(r!==null&&Gg(r)){const i=r.firstChild;if(i===n||i.nextSibling===n&&Ap(i)){const o=r.lastChild;if(o===n||o.previousSibling===n&&Ap(o))return!0}}return!1})(e)||(function(n){const r=n.parentElement;if(r!==null&&Gg(r)){const i=r.firstChild;if(i===n||i.nextSibling===n&&Ap(i))return!1;const o=r.lastChild;if(o===n||o.previousSibling===n&&Ap(o))return!0}return!1})(e)?null:{conversion:
|
|
376
|
+
`){const r=Ge();if(De(r)){const i=r.focus;return r.anchor.set(i.key,i.offset,i.type),void tt(t,jg,null)}}}z0(!0,t,e)}function ZL(t){let e=t.__lexicalEventHandles;return e===void 0&&(e=[],t.__lexicalEventHandles=e),e}const au=new Map;function QL(t){const e=h9(t.target);if(e===null)return;const n=av(e.anchorNode);if(n===null)return;Dy&&(Dy=!1,Ui(n,()=>{const l=wc(),u=e.anchorNode;(In(u)||us(u))&&Br(C0(l,e,n,t))}));const r=F0(n),i=r[r.length-1],o=i._key,a=au.get(o),s=a||i;s!==n&&kE(e,s,!1),kE(e,n,!0),n!==i?au.set(o,n):a&&au.delete(o)}function SE(t){t._lexicalHandled=!0}function EE(t){return t._lexicalHandled===!0}function OV(t){const e=Ry.get(t);if(e===void 0)return;const n=Ug.get(e);if(n===void 0)return;const r=n-1;r>=0||Be(164),Ry.delete(t),Ug.set(e,r),r===0&&e.removeEventListener("selectionchange",QL);const i=sv(t);D0(i)?((function(a){if(a._parentEditor!==null){const s=F0(a),l=s[s.length-1]._key;au.get(l)===a&&au.delete(l)}else au.delete(a._key)})(i),t.__lexicalEditor=null):i&&Be(198);const o=ZL(t);for(let a=0;a<o.length;a++)o[a]();t.__lexicalEventHandles=[]}function Fy(t,e,n){Tr();const r=t.__key,i=t.getParent();if(i===null)return;const o=(function(s){const l=Ge();if(!De(l)||!we(s))return l;const{anchor:u,focus:d}=l,f=u.getNode(),h=d.getNode();return Hy(f,s)&&u.set(s.__key,0,"element"),Hy(h,s)&&d.set(s.__key,0,"element"),l})(t);let a=!1;if(De(o)&&e){const s=o.anchor,l=o.focus;s.key===r&&(Hg(s,t,i,t.getPreviousSibling(),t.getNextSibling()),a=!0),l.key===r&&(Hg(l,t,i,t.getPreviousSibling(),t.getNextSibling()),a=!0)}else ai(o)&&e&&t.isSelected()&&t.selectPrevious();if(De(o)&&e&&!a){const s=t.getIndexWithinParent();Cl(t),qg(o,i,s,-1)}else Cl(t);n||Yi(i)||i.canBeEmpty()||!i.isEmpty()||Fy(i,e),e&&o&&ur(i)&&i.isEmpty()&&i.selectEnd()}const eI=Symbol.for("ephemeral");function Bg(t){return t[eI]||!1}class ha{__type;__key;__parent;__prev;__next;__state;static getType(){const{ownNodeType:e}=uv(this);return e===void 0&&Be(64,this.name),e}static clone(e){Be(65,this.name)}$config(){return{}}config(e,n){const r=n.extends||Object.getPrototypeOf(this.constructor);return Object.assign(n,{extends:r,type:e}),{[e]:n}}afterCloneFrom(e){this.__key===e.__key?(this.__parent=e.__parent,this.__next=e.__next,this.__prev=e.__prev,this.__state=e.__state):e.__state&&(this.__state=e.__state.getWritable(this))}static importDOM;constructor(e){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Object.defineProperty(this,"__state",{configurable:!0,enumerable:!1,value:void 0,writable:!0}),o9(this,e)}getType(){return this.__type}isInline(){Be(137,this.constructor.name)}isAttached(){let e=this.__key;for(;e!==null;){if(e==="root")return!0;const n=qn(e);if(n===null)break;e=n.__parent}return!1}isSelected(e){const n=e||Ge();if(n==null)return!1;const r=n.getNodes().some(i=>i.__key===this.__key);if(Ye(this))return r;if(De(n)&&n.anchor.type==="element"&&n.focus.type==="element"){if(n.isCollapsed())return!1;const i=this.getParent();if(Gt(this)&&this.isInline()&&i){const o=n.isBackward()?n.focus:n.anchor;if(i.is(o.getNode())&&o.offset===i.getChildrenSize()&&this.is(i.getLastChild()))return!1}}return r}getKey(){return this.__key}getIndexWithinParent(){const e=this.getParent();if(e===null)return-1;let n=e.getFirstChild(),r=0;for(;n!==null;){if(this.is(n))return r;r++,n=n.getNextSibling()}return-1}getParent(){const e=this.getLatest().__parent;return e===null?null:qn(e)}getParentOrThrow(){const e=this.getParent();return e===null&&Be(66,this.__key),e}getTopLevelElement(){let e=this;for(;e!==null;){const n=e.getParent();if(Yi(n))return we(e)||e===this&&Gt(e)||Be(194),e;e=n}return null}getTopLevelElementOrThrow(){const e=this.getTopLevelElement();return e===null&&Be(67,this.__key),e}getParents(){const e=[];let n=this.getParent();for(;n!==null;)e.push(n),n=n.getParent();return e}getParentKeys(){const e=[];let n=this.getParent();for(;n!==null;)e.push(n.__key),n=n.getParent();return e}getPreviousSibling(){const e=this.getLatest().__prev;return e===null?null:qn(e)}getPreviousSiblings(){const e=[],n=this.getParent();if(n===null)return e;let r=n.getFirstChild();for(;r!==null&&!r.is(this);)e.push(r),r=r.getNextSibling();return e}getNextSibling(){const e=this.getLatest().__next;return e===null?null:qn(e)}getNextSiblings(){const e=[];let n=this.getNextSibling();for(;n!==null;)e.push(n),n=n.getNextSibling();return e}getCommonAncestor(e){const n=we(this)?this:this.getParent(),r=we(e)?e:e.getParent(),i=n&&r?rg(n,r):null;return i?i.commonAncestor:null}is(e){return e!=null&&this.__key===e.__key}isBefore(e){const n=rg(this,e);return n!==null&&(n.type==="descendant"||(n.type==="branch"?AI(n)===-1:(n.type!=="same"&&n.type!=="ancestor"&&Be(279),!1)))}isParentOf(e){const n=rg(this,e);return n!==null&&n.type==="ancestor"}getNodesBetween(e){const n=this.isBefore(e),r=[],i=new Set;let o=this;for(;o!==null;){const a=o.__key;if(i.has(a)||(i.add(a),r.push(o)),o===e)break;const s=we(o)?n?o.getFirstChild():o.getLastChild():null;if(s!==null){o=s;continue}const l=n?o.getNextSibling():o.getPreviousSibling();if(l!==null){o=l;continue}const u=o.getParentOrThrow();if(i.has(u.__key)||r.push(u),u===e)break;let d=null,f=u;do{if(f===null&&Be(68),d=n?f.getNextSibling():f.getPreviousSibling(),f=f.getParent(),f===null)break;d!==null||i.has(f.__key)||r.push(f)}while(d===null);o=d}return n||r.reverse(),r}isDirty(){const e=Vn()._dirtyLeaves;return e!==null&&e.has(this.__key)}getLatest(){if(Bg(this))return this;const e=qn(this.__key);return e===null&&Be(113),e}getWritable(){if(Bg(this))return this;Tr();const e=tl(),n=Vn(),r=e._nodeMap,i=this.__key,o=this.getLatest(),a=n._cloneNotNeeded,s=Ge();if(s!==null&&s.setCachedNodes(null),a.has(i))return Vg(o),o;const l=TI(o);return a.add(i),Vg(l),r.set(i,l),l}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(e,n){Be(70)}updateDOM(e,n,r){Be(71)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){const e=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...e}}static importJSON(e){Be(18,this.name)}updateFromJSON(e){return(function(n,r){const i=n.getWritable(),o=r.$;let a=o;for(const s of CL(i).flatKeys)s in r&&(a!==void 0&&a!==o||(a={...o}),a[s]=r[s]);return(i.__state||a)&&AL(n).updateFromJSON(a),i})(this,e)}static transform(){return null}remove(e){Fy(this,!0,e)}replace(e,n){Tr();let r=Ge();r!==null&&(r=r.clone()),$_(this,e);const i=this.getLatest(),o=this.__key,a=e.__key,s=e.getWritable(),l=this.getParentOrThrow().getWritable(),u=l.__size;Cl(s);const d=i.getPreviousSibling(),f=i.getNextSibling(),h=i.__prev,p=i.__next,g=i.__parent;if(Fy(i,!1,!0),d===null?l.__first=a:d.getWritable().__next=a,s.__prev=h,f===null?l.__last=a:f.getWritable().__prev=a,s.__next=p,s.__parent=g,l.__size=u,n&&(we(this)&&we(s)||Be(139),this.getChildren().forEach(m=>{s.append(m)})),De(r)){Br(r);const m=r.anchor,v=r.focus;m.key===o&&CE(m,s),v.key===o&&CE(v,s)}return ks()===o&&Ir(a),s}insertAfter(e,n=!0){Tr(),$_(this,e);const r=this.getWritable(),i=e.getWritable(),o=i.getParent(),a=Ge();let s=!1,l=!1;if(o!==null){const p=e.getIndexWithinParent();if(Cl(i),De(a)){const g=o.__key,m=a.anchor,v=a.focus;s=m.type==="element"&&m.key===g&&m.offset===p+1,l=v.type==="element"&&v.key===g&&v.offset===p+1}}const u=this.getNextSibling(),d=this.getParentOrThrow().getWritable(),f=i.__key,h=r.__next;if(u===null?d.__last=f:u.getWritable().__prev=f,d.__size++,r.__next=f,i.__next=h,i.__prev=r.__key,i.__parent=r.__parent,n&&De(a)){const p=this.getIndexWithinParent();qg(a,d,p+1);const g=d.__key;s&&a.anchor.set(g,p+2,"element"),l&&a.focus.set(g,p+2,"element")}return e}insertBefore(e,n=!0){Tr(),$_(this,e);const r=this.getWritable(),i=e.getWritable(),o=i.__key;Cl(i);const a=this.getPreviousSibling(),s=this.getParentOrThrow().getWritable(),l=r.__prev,u=this.getIndexWithinParent();a===null?s.__first=o:a.getWritable().__next=o,s.__size++,r.__prev=o,i.__prev=l,i.__next=r.__key,i.__parent=r.__parent;const d=Ge();return n&&De(d)&&qg(d,this.getParentOrThrow(),u),e}isParentRequired(){return!1}createParentElementNode(){return Tn()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,n){Tr();const r=this.getPreviousSibling(),i=this.getParentOrThrow();if(r===null)return i.select(0,0);if(we(r))return r.select();if(!Ye(r)){const o=r.getIndexWithinParent()+1;return i.select(o,o)}return r.select(e,n)}selectNext(e,n){Tr();const r=this.getNextSibling(),i=this.getParentOrThrow();if(r===null)return i.select();if(we(r))return r.select(0,0);if(!Ye(r)){const o=r.getIndexWithinParent();return i.select(o,o)}return r.select(e,n)}markDirty(){this.getWritable()}reconcileObservedMutation(e,n){this.markDirty()}}const zy="historic",LV="history-push",$f="history-merge",IV="paste",NV="collaboration",RV="skip-scroll-into-view",MV="skip-dom-selection",DV="skip-selection-focus";class _d extends ha{static getType(){return"linebreak"}static clone(e){return new _d(e.__key)}constructor(e){super(e)}getTextContent(){return`
|
|
377
|
+
`}createDOM(){return document.createElement("br")}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:e=>(function(n){const r=n.parentElement;if(r!==null&&Gg(r)){const i=r.firstChild;if(i===n||i.nextSibling===n&&Ap(i)){const o=r.lastChild;if(o===n||o.previousSibling===n&&Ap(o))return!0}}return!1})(e)||(function(n){const r=n.parentElement;if(r!==null&&Gg(r)){const i=r.firstChild;if(i===n||i.nextSibling===n&&Ap(i))return!1;const o=r.lastChild;if(o===n||o.previousSibling===n&&Ap(o))return!0}return!1})(e)?null:{conversion:FV,priority:0}}}static importJSON(e){return no().updateFromJSON(e)}}function FV(t){return{node:no()}}function no(){return Di(new _d)}function Bn(t){return t instanceof _d}function Ap(t){return us(t)&&/^( |\t|\r?\n)+$/.test(t.textContent||"")}function x_(t,e){return 16&e?"code":e&bL?"mark":32&e?"sub":64&e?"sup":null}function k_(t,e){return 1&e?"strong":2&e?"em":"span"}function tI(t,e,n,r,i){const o=r.classList;let a=su(i,"base");a!==void 0&&o.add(...a),a=su(i,"underlineStrikethrough");let s=!1;const l=8&e&&4&e;a!==void 0&&(8&n&&4&n?(s=!0,l||o.add(...a)):l&&o.remove(...a));for(const u in Yl){const d=Yl[u];if(a=su(i,u),a!==void 0)if(n&d){if(s&&(u==="underline"||u==="strikethrough")){e&d&&o.remove(...a);continue}((e&d)===0||l&&u==="underline"||u==="strikethrough")&&o.add(...a)}else e&d&&o.remove(...a)}}function nI(t,e,n){const r=e.firstChild,i=n.isComposing(),o=t+(i?ev:"");if(r==null)e.textContent=o;else{const a=r.nodeValue;if(a!==o)if(i||Wl){const[s,l,u]=(function(d,f){const h=d.length,p=f.length;let g=0,m=0;for(;g<h&&g<p&&d[g]===f[g];)g++;for(;m+g<h&&m+g<p&&d[h-m-1]===f[p-m-1];)m++;return[g,h-g-m,f.slice(g,p-m)]})(a,o);l!==0&&r.deleteData(s,l),r.insertData(s,u)}else r.nodeValue=o}}function TE(t,e,n,r,i,o){nI(i,t,e);const a=o.theme.text;a!==void 0&&tI(0,0,r,t,a)}function Cp(t,e){const n=document.createElement(e);return n.appendChild(t),n}class cs extends ha{__text;__format;__style;__mode;__detail;static getType(){return"text"}static clone(e){return new cs(e.__text,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__text=e.__text,this.__format=e.__format,this.__style=e.__style,this.__mode=e.__mode,this.__detail=e.__detail}constructor(e="",n){super(n),this.__text=e,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const e=this.getLatest();return uV[e.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===ks()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){const n=Yl[e];return(this.getFormat()&n)!==0}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(e,n){return Kg(this.getLatest().__format,e,n)}canHaveFormat(){return!0}isInline(){return!0}createDOM(e,n){const r=this.__format,i=x_(0,r),o=k_(0,r),a=i===null?o:i,s=document.createElement(a);let l=s;this.hasFormat("code")&&s.setAttribute("spellcheck","false"),i!==null&&(l=document.createElement(o),s.appendChild(l)),TE(l,this,0,r,this.__text,e);const u=this.__style;return u!==""&&(s.style.cssText=u),s}updateDOM(e,n,r){const i=this.__text,o=e.__format,a=this.__format,s=x_(0,o),l=x_(0,a),u=k_(0,o),d=k_(0,a);if((s===null?u:s)!==(l===null?d:l))return!0;if(s===l&&u!==d){const m=n.firstChild;m==null&&Be(48);const v=document.createElement(d);return TE(v,this,0,a,i,r),n.replaceChild(v,m),!1}let f=n;l!==null&&s!==null&&(f=n.firstChild,f==null&&Be(49)),nI(i,f,this);const h=r.theme.text;h!==void 0&&o!==a&&tI(0,o,a,f,h);const p=e.__style,g=this.__style;return p!==g&&(n.style.cssText=g),!1}static importDOM(){return{"#text":()=>({conversion:BV,priority:0}),b:()=>({conversion:jV,priority:0}),code:()=>({conversion:Oa,priority:0}),em:()=>({conversion:Oa,priority:0}),i:()=>({conversion:Oa,priority:0}),mark:()=>({conversion:Oa,priority:0}),s:()=>({conversion:Oa,priority:0}),span:()=>({conversion:zV,priority:0}),strong:()=>({conversion:Oa,priority:0}),sub:()=>({conversion:Oa,priority:0}),sup:()=>({conversion:Oa,priority:0}),u:()=>({conversion:Oa,priority:0})}}static importJSON(e){return zn().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTextContent(e.text).setFormat(e.format).setDetail(e.detail).setMode(e.mode).setStyle(e.style)}exportDOM(e){let{element:n}=super.exportDOM(e);return In(n)||Be(132),n.style.whiteSpace="pre-wrap",this.hasFormat("lowercase")?n.style.textTransform="lowercase":this.hasFormat("uppercase")?n.style.textTransform="uppercase":this.hasFormat("capitalize")&&(n.style.textTransform="capitalize"),this.hasFormat("bold")&&(n=Cp(n,"b")),this.hasFormat("italic")&&(n=Cp(n,"i")),this.hasFormat("strikethrough")&&(n=Cp(n,"s")),this.hasFormat("underline")&&(n=Cp(n,"u")),{element:n}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(e,n){}setFormat(e){const n=this.getWritable();return n.__format=typeof e=="string"?Yl[e]:e,n}setDetail(e){const n=this.getWritable();return n.__detail=typeof e=="string"?sV[e]:e,n}setStyle(e){const n=this.getWritable();return n.__style=e,n}toggleFormat(e){const n=Kg(this.getFormat(),e,null);return this.setFormat(n)}toggleDirectionless(){const e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){const e=this.getWritable();return e.__detail^=2,e}setMode(e){const n=cV[e];if(this.__mode===n)return this;const r=this.getWritable();return r.__mode=n,r}setTextContent(e){if(this.__text===e)return this;const n=this.getWritable();return n.__text=e,n}select(e,n){Tr();let r=e,i=n;const o=Ge(),a=this.getTextContent(),s=this.__key;if(typeof a=="string"){const l=a.length;r===void 0&&(r=l),i===void 0&&(i=l)}else r=0,i=0;if(!De(o))return oI(s,r,s,i,"text","text");{const l=ks();l!==o.anchor.key&&l!==o.focus.key||Ir(s),o.setTextNodeRange(this,r,this,i)}return o}selectStart(){return this.select(0,0)}selectEnd(){const e=this.getTextContentSize();return this.select(e,e)}spliceText(e,n,r,i){const o=this.getWritable(),a=o.__text,s=r.length;let l=e;l<0&&(l=s+l,l<0&&(l=0));const u=Ge();if(i&&De(u)){const f=e+s;u.setTextNodeRange(o,f,o,f)}const d=a.slice(0,l)+r+a.slice(l+n);return o.__text=d,o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){Tr();const n=this.getLatest(),r=n.getTextContent();if(r==="")return[];const i=n.__key,o=ks(),a=r.length;e.sort((k,T)=>k-T),e.push(a);const s=[],l=e.length;for(let k=0,T=0;k<a&&T<=l;T++){const C=e[T];C>k&&(s.push(r.slice(k,C)),k=C)}const u=s.length;if(u===1)return[n];const d=s[0],f=n.getParent();let h;const p=n.getFormat(),g=n.getStyle(),m=n.__detail;let v=!1,b=null,y=null;const w=Ge();if(De(w)){const[k,T]=w.isBackward()?[w.focus,w.anchor]:[w.anchor,w.focus];k.type==="text"&&k.key===i&&(b=k),T.type==="text"&&T.key===i&&(y=T)}n.isSegmented()?(h=zn(d),h.__format=p,h.__style=g,h.__detail=m,h.__state=mE(n,h),v=!0):h=n.setTextContent(d);const x=[h];for(let k=1;k<u;k++){const T=zn(s[k]);T.__format=p,T.__style=g,T.__detail=m,T.__state=mE(n,T);const C=T.__key;o===i&&Ir(C),x.push(T)}const E=b?b.offset:null,$=y?y.offset:null;let A=0;for(const k of x){if(!b&&!y)break;const T=A+k.getTextContentSize();if(b!==null&&E!==null&&E<=T&&E>=A&&(b.set(k.getKey(),E-A,"text"),E<T&&(b=null)),y!==null&&$!==null&&$<=T&&$>=A){y.set(k.getKey(),$-A,"text");break}A=T}if(f!==null){(function(C){const P=C.getPreviousSibling(),O=C.getNextSibling();P!==null&&Vg(P),O!==null&&Vg(O)})(this);const k=f.getWritable(),T=this.getIndexWithinParent();v?(k.splice(T,0,x),this.remove()):k.splice(T,1,x),De(w)&&qg(w,f,T,u-1)}return x}mergeWithSibling(e){const n=e===this.getPreviousSibling();n||e===this.getNextSibling()||Be(50);const r=this.__key,i=e.__key,o=this.__text,a=o.length;ks()===i&&Ir(r);const s=Ge();if(De(s)){const f=s.anchor,h=s.focus;f!==null&&f.key===i&&ME(f,n,r,e,a),h!==null&&h.key===i&&ME(h,n,r,e,a)}const l=e.__text,u=n?l+o:o+l;this.setTextContent(u);const d=this.getWritable();return e.remove(),d}isTextEntity(){return!1}}function zV(t){return{forChild:A0(t.style),node:null}}function jV(t){const e=t,n=e.style.fontWeight==="normal";return{forChild:A0(e.style,n?void 0:"bold"),node:null}}const $E=new WeakMap;function UV(t){if(!In(t))return!1;if(t.nodeName==="PRE")return!0;const e=t.style.whiteSpace;return typeof e=="string"&&e.startsWith("pre")}function BV(t){const e=t;t.parentElement===null&&Be(129);let n=e.textContent||"";if((function(r){let i,o=r.parentNode;const a=[r];for(;o!==null&&(i=$E.get(o))===void 0&&!UV(o);)a.push(o),o=o.parentNode;const s=i===void 0?o:i;for(let l=0;l<a.length;l++)$E.set(a[l],s);return s})(e)!==null){const r=n.split(/(\r?\n|\t)/),i=[],o=r.length;for(let a=0;a<o;a++){const s=r[a];s===`
|
|
378
378
|
`||s===`\r
|
|
379
|
-
`?i.push(no()):s===" "?i.push(Do()):s!==""&&i.push(zn(s))}return{node:i}}if(n=n.replace(/\r/g,"").replace(/[ \t\n]+/g," "),n==="")return{node:null};if(n[0]===" "){let r=e,i=!0;for(;r!==null&&(r=AE(r,!1))!==null;){const o=r.textContent||"";if(o.length>0){/[ \t\n]$/.test(o)&&(n=n.slice(1)),i=!1;break}}i&&(n=n.slice(1))}if(n[n.length-1]===" "){let r=e,i=!0;for(;r!==null&&(r=AE(r,!0))!==null;)if((r.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){i=!1;break}i&&(n=n.slice(0,n.length-1))}return n===""?{node:null}:{node:zn(n)}}function AE(t,e){let n=t;for(;;){let r;for(;(r=e?n.nextSibling:n.previousSibling)===null;){const o=n.parentElement;if(o===null)return null;n=o}if(n=r,In(n)){const o=n.style.display;if(o===""&&!Gy(n)||o!==""&&!o.startsWith("inline"))return null}let i=n;for(;(i=e?n.firstChild:n.lastChild)!==null;)n=i;if(us(n))return n;if(n.nodeName==="BR")return null}}const
|
|
379
|
+
`?i.push(no()):s===" "?i.push(Do()):s!==""&&i.push(zn(s))}return{node:i}}if(n=n.replace(/\r/g,"").replace(/[ \t\n]+/g," "),n==="")return{node:null};if(n[0]===" "){let r=e,i=!0;for(;r!==null&&(r=AE(r,!1))!==null;){const o=r.textContent||"";if(o.length>0){/[ \t\n]$/.test(o)&&(n=n.slice(1)),i=!1;break}}i&&(n=n.slice(1))}if(n[n.length-1]===" "){let r=e,i=!0;for(;r!==null&&(r=AE(r,!0))!==null;)if((r.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){i=!1;break}i&&(n=n.slice(0,n.length-1))}return n===""?{node:null}:{node:zn(n)}}function AE(t,e){let n=t;for(;;){let r;for(;(r=e?n.nextSibling:n.previousSibling)===null;){const o=n.parentElement;if(o===null)return null;n=o}if(n=r,In(n)){const o=n.style.display;if(o===""&&!Gy(n)||o!==""&&!o.startsWith("inline"))return null}let i=n;for(;(i=e?n.firstChild:n.lastChild)!==null;)n=i;if(us(n))return n;if(n.nodeName==="BR")return null}}const qV={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Oa(t){const e=qV[t.nodeName.toLowerCase()];return e===void 0?{node:null}:{forChild:A0(t.style,e),node:null}}function zn(t=""){return Di(new cs(t))}function Ye(t){return t instanceof cs}function A0(t,e){const n=t.fontWeight,r=t.textDecoration.split(" "),i=n==="700"||n==="bold",o=r.includes("line-through"),a=t.fontStyle==="italic",s=r.includes("underline"),l=t.verticalAlign;return u=>(Ye(u)&&(i&&!u.hasFormat("bold")&&u.toggleFormat("bold"),o&&!u.hasFormat("strikethrough")&&u.toggleFormat("strikethrough"),a&&!u.hasFormat("italic")&&u.toggleFormat("italic"),s&&!u.hasFormat("underline")&&u.toggleFormat("underline"),l!=="sub"||u.hasFormat("subscript")||u.toggleFormat("subscript"),l!=="super"||u.hasFormat("superscript")||u.toggleFormat("superscript"),e&&!u.hasFormat(e)&&u.toggleFormat(e)),u)}class bd extends cs{static getType(){return"tab"}static clone(e){return new bd(e.__key)}constructor(e){super(" ",e),this.__detail=2}static importDOM(){return null}createDOM(e){const n=super.createDOM(e),r=su(e.theme,"tab");return r!==void 0&&n.classList.add(...r),n}static importJSON(e){return Do().updateFromJSON(e)}setTextContent(e){return e!==" "&&e!==""&&mL(126),super.setTextContent(" ")}spliceText(e,n,r,i){return r===""&&n===0||r===" "&&n===1||Be(286),this}setDetail(e){return e!==2&&Be(127),this}setMode(e){return e!=="normal"&&Be(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Do(){return Di(new bd)}function hi(t){return t instanceof bd}class HV{key;offset;type;_selection;constructor(e,n,r){this._selection=null,this.key=e,this.offset=n,this.type=r}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){return this.key===e.key?this.offset<e.offset:$I(Lo(es(this,"next")),Lo(es(e,"next")))<0}getNode(){const e=qn(this.key);return e===null&&Be(20),e}set(e,n,r,i){const o=this._selection,a=this.key;i&&this.key===e&&this.offset===n&&this.type===r||(this.key=e,this.offset=n,this.type=r,Hh()||(ks()===a&&Ir(e),o!==null&&(o.setCachedNodes(null),o.dirty=!0)))}}function Ri(t,e,n){return new HV(t,e,n)}function S_(t,e){let n=e.__key,r=t.offset,i="element";if(Ye(e)){i="text";const o=e.getTextContentSize();r>o&&(r=o)}else if(!we(e)){const o=e.getNextSibling();if(Ye(o))n=o.__key,r=0,i="text";else{const a=e.getParent();a&&(n=a.__key,r=e.getIndexWithinParent()+1)}}t.set(n,r,i)}function CE(t,e){if(we(e)){const n=e.getLastDescendant();we(n)||Ye(n)?S_(t,n):S_(t,e)}else S_(t,e)}class rv{_nodes;_cachedNodes;dirty;constructor(e){this._cachedNodes=null,this._nodes=e,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!ai(e))return!1;const n=this._nodes,r=e._nodes;return n.size===r.size&&Array.from(n).every(i=>r.has(i))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(e){this.dirty=!0,this._nodes.add(e),this._cachedNodes=null}delete(e){this.dirty=!0,this._nodes.delete(e),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(e){return this._nodes.has(e)}clone(){return new rv(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){const n=this.getNodes(),r=n.length,i=n[r-1];let o;if(Ye(i))o=i.select();else{const a=i.getIndexWithinParent()+1;o=i.getParentOrThrow().select(a,a)}o.insertNodes(e);for(let a=0;a<r;a++)n[a].remove()}getNodes(){const e=this._cachedNodes;if(e!==null)return e;const n=this._nodes,r=[];for(const i of n){const o=qn(i);o!==null&&r.push(o)}return Hh()||(this._cachedNodes=r),r}getTextContent(){const e=this.getNodes();let n="";for(let r=0;r<e.length;r++)n+=e[r].getTextContent();return n}deleteNodes(){const e=this.getNodes();if((Ge()||wc())===this&&e[0]){const n=Cr(e[0],"next");CI(Qa(n,n))}for(const n of e)n.remove()}}function De(t){return t instanceof yc}class yc{format;style;anchor;focus;_cachedNodes;dirty;constructor(e,n,r,i){this.anchor=e,this.focus=n,e._selection=this,n._selection=this,this._cachedNodes=null,this.format=r,this.style=i,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return!!De(e)&&this.anchor.is(e.anchor)&&this.focus.is(e.focus)&&this.format===e.format&&this.style===e.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const e=this._cachedNodes;if(e!==null)return e;const n=(function(r){const i=[],[o,a]=r.getTextSlices();o&&i.push(o.caret.origin);const s=new Set,l=new Set;for(const u of r)if(pa(u)){const{origin:d}=u;i.length===0?s.add(d):(l.add(d),i.push(d))}else{const{origin:d}=u;we(d)&&l.has(d)||i.push(d)}if(a&&i.push(a.caret.origin),tc(r.focus)&&we(r.focus.origin)&&r.focus.getNodeAtCaret()===null)for(let u=ya(r.focus.origin,"previous");pa(u)&&s.has(u.origin)&&!u.origin.isEmpty()&&u.origin.is(i[i.length-1]);u=V0(u))s.delete(u.origin),i.pop();for(;i.length>1;){const u=i[i.length-1];if(!we(u)||l.has(u)||u.isEmpty()||s.has(u))break;i.pop()}if(i.length===0&&r.isCollapsed()){const u=Lo(r.anchor),d=Lo(r.anchor.getFlipped()),f=p=>Ls(p)?p.origin:p.getNodeAtCaret(),h=f(u)||f(d)||(r.anchor.getNodeAtCaret()?u.origin:d.origin);i.push(h)}return i})(X0(nT(this),"next"));return Hh()||(this._cachedNodes=n),n}setTextNodeRange(e,n,r,i){this.anchor.set(e.__key,n,"text"),this.focus.set(r.__key,i,"text")}getTextContent(){const e=this.getNodes();if(e.length===0)return"";const n=e[0],r=e[e.length-1],i=this.anchor,o=this.focus,a=i.isBefore(o),[s,l]=jy(this);let u="",d=!0;for(let f=0;f<e.length;f++){const h=e[f];if(we(h)&&!h.isInline())d||(u+=`
|
|
380
380
|
`),d=!h.isEmpty();else if(d=!1,Ye(h)){let p=h.getTextContent();h===n?h===r?i.type==="element"&&o.type==="element"&&o.offset!==i.offset||(p=s<l?p.slice(s,l):p.slice(l,s)):p=a?p.slice(s):p.slice(l):h===r&&(p=a?p.slice(0,l):p.slice(0,s)),u+=p}else!Gt(h)&&!Bn(h)||h===r&&this.isCollapsed()||(u+=h.getTextContent())}return u}applyDOMRange(e){const n=Vn(),r=n.getEditorState()._selection,i=iI(e.startContainer,e.startOffset,e.endContainer,e.endOffset,n,r);if(i===null)return;const[o,a]=i;this.anchor.set(o.key,o.offset,o.type,!0),this.focus.set(a.key,a.offset,a.type,!0),Ru(this)}clone(){const e=this.anchor,n=this.focus;return new yc(Ri(e.key,e.offset,e.type),Ri(n.key,n.offset,n.type),this.format,this.style)}toggleFormat(e){this.format=Kg(this.format,e,null),this.dirty=!0}setFormat(e){this.format=e,this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){const n=Yl[e];return(this.format&n)!==0}insertRawText(e){const n=e.split(/(\r?\n|\t)/),r=[],i=n.length;for(let o=0;o<i;o++){const a=n[o];a===`
|
|
381
381
|
`||a===`\r
|
|
382
|
-
`?r.push(no()):a===" "?r.push(Do()):r.push(zn(a))}this.insertNodes(r)}insertText(e){const n=this.anchor,r=this.focus,i=this.format,o=this.style;let a=n,s=r;!this.isCollapsed()&&r.isBefore(n)&&(a=r,s=n),a.type==="element"&&(function(v,b,y,w){const x=v.getNode(),E=x.getChildAtIndex(v.offset),$=zn();if($.setFormat(y),$.setStyle(w),Vh(E))E.splice(0,0,[$]);else{const A=ur(x)?Tn().append($):$;E===null?x.append(A):E.insertBefore(A)}v.is(b)&&b.set($.__key,0,"text"),v.set($.__key,0,"text")})(a,s,i,o),s.type==="element"&&ch(s,Lo(es(s,"next")));const l=a.offset;let u=s.offset;const d=this.getNodes(),f=d.length;let h=d[0];Ye(h)||Be(26);const p=h.getTextContent().length,g=h.getParentOrThrow();let m=d[f-1];if(f===1&&s.type==="element"&&(u=p,s.set(a.key,u,"text")),this.isCollapsed()&&l===p&&(Ra(h)||!h.canInsertTextAfter()||!g.canInsertTextAfter()&&h.getNextSibling()===null)){let v=h.getNextSibling();if(Ye(v)&&v.canInsertTextBefore()&&!Ra(v)||(v=zn(),v.setFormat(i),v.setStyle(o),g.canInsertTextAfter()?h.insertAfter(v):g.insertAfter(v)),v.select(0,0),h=v,e!=="")return void this.insertText(e)}else if(this.isCollapsed()&&l===0&&(Ra(h)||!h.canInsertTextBefore()||!g.canInsertTextBefore()&&h.getPreviousSibling()===null)){let v=h.getPreviousSibling();if(Ye(v)&&!Ra(v)||(v=zn(),v.setFormat(i),g.canInsertTextBefore()?h.insertBefore(v):g.insertBefore(v)),v.select(),h=v,e!=="")return void this.insertText(e)}else if(h.isSegmented()&&l!==p){const v=zn(h.getTextContent());v.setFormat(i),h.replace(v),h=v}else if(!this.isCollapsed()&&e!==""){const v=m.getParent();if(!g.canInsertTextBefore()||!g.canInsertTextAfter()||we(v)&&(!v.canInsertTextBefore()||!v.canInsertTextAfter()))return this.insertText(""),rI(this.anchor,this.focus,null),void this.insertText(e)}if(f===1){if(Al(h)){const w=zn(e);return w.select(),void h.replace(w)}const v=h.getFormat(),b=h.getStyle();if(l!==u||v===i&&b===o){if(hi(h)){const w=zn(e);return w.setFormat(i),w.setStyle(o),w.select(),void h.replace(w)}}else{if(h.getTextContent()!==""){const w=zn(e);if(w.setFormat(i),w.setStyle(o),w.select(),l===0)h.insertBefore(w,!1);else{const[x]=h.splitText(l);x.insertAfter(w,!1)}return void(w.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=e.length))}h.setFormat(i),h.setStyle(o)}const y=u-l;h=h.spliceText(l,y,e,!0),h.getTextContent()===""?h.remove():this.anchor.type==="text"&&(h.isComposing()?this.anchor.offset-=e.length:(this.format=v,this.style=b))}else{const v=new Set([...h.getParentKeys(),...m.getParentKeys()]),b=we(h)?h:h.getParentOrThrow();let y=we(m)?m:m.getParentOrThrow(),w=m;if(!b.is(y)&&y.isInline())do w=y,y=y.getParentOrThrow();while(y.isInline());if(s.type==="text"&&(u!==0||m.getTextContent()==="")||s.type==="element"&&m.getIndexWithinParent()<u)if(Ye(m)&&!Al(m)&&u!==m.getTextContentSize()){if(m.isSegmented()){const k=zn(m.getTextContent());m.replace(k),m=k}ur(s.getNode())||s.type!=="text"||(m=m.spliceText(0,u,"")),v.add(m.__key)}else{const k=m.getParentOrThrow();k.canBeEmpty()||k.getChildrenSize()!==1?m.remove():k.remove()}else v.add(m.__key);const x=y.getChildren(),E=new Set(d),$=b.is(y),A=b.isInline()&&h.getNextSibling()===null?b:h;for(let k=x.length-1;k>=0;k--){const T=x[k];if(T.is(h)||we(T)&&T.isParentOf(h))break;T.isAttached()&&(!E.has(T)||T.is(w)?$||A.insertAfter(T,!1):T.remove())}if(!$){let k=y,T=null;for(;k!==null;){const C=k.getChildren(),P=C.length;(P===0||C[P-1].is(T))&&(v.delete(k.__key),T=k),k=k.getParent()}}if(Al(h))if(l===p)h.select();else{const k=zn(e);k.select(),h.replace(k)}else h=h.spliceText(l,p-l,e,!0),h.getTextContent()===""?h.remove():h.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=e.length);for(let k=1;k<f;k++){const T=d[k],C=T.__key;v.has(C)||T.remove()}}}removeText(){const e=Ge()===this;ig(this,$V(nT(this))),e&&Ge()!==this&&Br(this)}formatText(e,n=null){if(this.isCollapsed())return this.toggleFormat(e),void Ir(null);const r=this.getNodes(),i=[];for(const x of r)Ye(x)&&i.push(x);const o=x=>{r.forEach(E=>{if(we(E)){const $=E.getFormatFlags(e,x);E.setTextFormat($)}})},a=i.length;if(a===0)return this.toggleFormat(e),Ir(null),void o(n);const s=this.anchor,l=this.focus,u=this.isBackward(),d=u?l:s,f=u?s:l;let h=0,p=i[0],g=d.type==="element"?0:d.offset;if(d.type==="text"&&g===p.getTextContentSize()&&(h=1,p=i[1],g=0),p==null)return;const m=p.getFormatFlags(e,n);o(m);const v=a-1;let b=i[v];const y=f.type==="text"?f.offset:b.getTextContentSize();if(p.is(b)){if(g===y)return;if(Ra(p)||g===0&&y===p.getTextContentSize())p.setFormat(m);else{const x=p.splitText(g,y),E=g===0?x[0]:x[1];E.setFormat(m),d.type==="text"&&d.set(E.__key,0,"text"),f.type==="text"&&f.set(E.__key,y-g,"text")}return void(this.format=m)}g===0||Ra(p)||([,p]=p.splitText(g),g=0),p.setFormat(m);const w=b.getFormatFlags(e,m);y>0&&(y===b.getTextContentSize()||Ra(b)||([b]=b.splitText(y)),b.setFormat(w));for(let x=h+1;x<v;x++){const E=i[x],$=E.getFormatFlags(e,w);E.setFormat($)}d.type==="text"&&d.set(p.__key,g,"text"),f.type==="text"&&f.set(b.__key,y,"text"),this.format=m|w}insertNodes(e){if(e.length===0)return;if(this.isCollapsed()||this.removeText(),this.anchor.key==="root"){this.insertParagraph();const g=Ge();return De(g)||Be(134),g.insertNodes(e)}const n=(this.isBackward()?this.focus:this.anchor).getNode(),r=pi(n,fo),i=e[e.length-1];if(we(r)&&"__language"in r){if("__language"in e[0])this.insertText(e[0].getTextContent());else{const g=E_(this);r.splice(g,0,e),i.selectEnd()}return}if(!e.some(g=>(we(g)||Gt(g))&&!g.isInline())){we(r)||Be(211,n.constructor.name,n.getType());const g=E_(this);return r.splice(g,0,e),void i.selectEnd()}const o=(function(g){const m=Tn();let v=null;for(let b=0;b<g.length;b++){const y=g[b],w=Bn(y);if(w||Gt(y)&&y.isInline()||we(y)&&y.isInline()||Ye(y)||y.isParentRequired()){if(v===null&&(v=y.createParentElementNode(),m.append(v),w))continue;v!==null&&v.append(y)}else m.append(y),v=null}return m})(e),a=o.getLastDescendant(),s=o.getChildren(),l=!we(r)||!r.isEmpty()?this.insertParagraph():null,u=s[s.length-1];let d=s[0];var f;we(f=d)&&fo(f)&&!f.isEmpty()&&we(r)&&(!r.isEmpty()||r.canMergeWhenEmpty())&&(we(r)||Be(211,n.constructor.name,n.getType()),r.append(...d.getChildren()),d=s[1]),d&&(r===null&&Be(212,n.constructor.name,n.getType()),(function(g,m){const v=m.getParentOrThrow().getLastChild();let b=m;const y=[m];for(;b!==v;)b.getNextSibling()||Be(140),b=b.getNextSibling(),y.push(b);let w=g;for(const x of y)w=w.insertAfter(x)})(r,d));const h=pi(a,fo);l&&we(h)&&(l.canMergeWhenEmpty()||fo(u))&&(h.append(...l.getChildren()),l.remove()),we(r)&&r.isEmpty()&&r.remove(),a.selectEnd();const p=we(r)?r.getLastChild():null;Bn(p)&&h!==r&&p.remove()}insertParagraph(){if(this.anchor.key==="root"){const a=Tn();return ar().splice(this.anchor.offset,0,[a]),a.select(),a}const e=E_(this),n=pi(this.anchor.getNode(),fo);we(n)||Be(213);const r=n.getChildAtIndex(e),i=r?[r,...r.getNextSiblings()]:[],o=n.insertNewAfter(this,!1);return o?(o.append(...i),o.selectStart(),o):null}insertLineBreak(e){const n=no();if(this.insertNodes([n]),e){const r=n.getParentOrThrow(),i=n.getIndexWithinParent();r.select(i,i)}}extract(){const e=[...this.getNodes()],n=e.length;let r=e[0],i=e[n-1];const[o,a]=jy(this),s=this.isBackward(),[l,u]=s?[this.focus,this.anchor]:[this.anchor,this.focus],[d,f]=s?[a,o]:[o,a];if(n===0)return[];if(n===1){if(Ye(r)&&!this.isCollapsed()){const h=r.splitText(d,f),p=d===0?h[0]:h[1];return p?(l.set(p.getKey(),0,"text"),u.set(p.getKey(),p.getTextContentSize(),"text"),[p]):[]}return[r]}if(Ye(r)&&(d===r.getTextContentSize()?e.shift():d!==0&&([,r]=r.splitText(d),e[0]=r,l.set(r.getKey(),0,"text"))),Ye(i)){const h=i.getTextContent().length;f===0?e.pop():f!==h&&([i]=i.splitText(f),e[e.length-1]=i,u.set(i.getKey(),i.getTextContentSize(),"text"))}return e}modify(e,n,r){if(DE(this,e,n,r))return;const i=e==="move",o=Vn(),a=Bo(bo(o));if(!a)return;const s=o._blockCursorElement,l=o._rootElement,u=this.focus.getNode();if(l===null||s===null||!we(u)||u.isInline()||u.canBeEmpty()||Ky(s,o,l),this.dirty){let d=Zl(o,this.anchor.key),f=Zl(o,this.focus.key);this.anchor.type==="text"&&(d=Fu(d)),this.focus.type==="text"&&(f=Fu(f)),d&&f&&sI(a,d,this.anchor.offset,f,this.focus.offset)}if((function(d,f,h,p){d.modify(f,h,p)})(a,e,n?"backward":"forward",r),a.rangeCount>0){const d=a.getRangeAt(0),f=this.anchor.getNode(),h=ur(f)?f:dV(f);if(this.applyDOMRange(d),this.dirty=!0,!i){const p=this.getNodes(),g=[];let m=!1;for(let v=0;v<p.length;v++){const b=p[v];Hy(b,h)?g.push(b):m=!0}if(m&&g.length>0)if(n){const v=g[0];we(v)?v.selectStart():v.getParentOrThrow().selectStart()}else{const v=g[g.length-1];we(v)?v.selectEnd():v.getParentOrThrow().selectEnd()}a.anchorNode===d.startContainer&&a.anchorOffset===d.startOffset||(function(v){const b=v.focus,y=v.anchor,w=y.key,x=y.offset,E=y.type;y.set(b.key,b.offset,b.type,!0),b.set(w,x,E,!0)})(this)}}r==="lineboundary"&&DE(this,e,n,r,"decorators")}forwardDeletion(e,n,r){if(!r&&(e.type==="element"&&we(n)&&e.offset===n.getChildrenSize()||e.type==="text"&&e.offset===n.getTextContentSize())){const i=n.getParent(),o=n.getNextSibling()||(i===null?null:i.getNextSibling());if(we(o)&&o.isShadowRoot())return!0}return!1}deleteCharacter(e){const n=this.isCollapsed();if(this.isCollapsed()){const r=this.anchor;let i=r.getNode();if(this.forwardDeletion(r,i,e))return;const o=W0(es(r,e?"previous":"next"));if(o.getTextSlices().every(s=>s===null||s.distance===0)){let s={type:"initial"};for(const l of o.iterNodeCarets("shadowRoot"))if(pa(l)){if(!l.origin.isInline()){if(l.origin.isShadowRoot()){if(s.type==="merge-block")break;if(we(o.anchor.origin)&&o.anchor.origin.isEmpty()){const u=Lo(l);ig(this,Qa(u,u)),o.anchor.origin.remove()}return}s.type!=="merge-next-block"&&s.type!=="merge-block"||(s={block:s.block,caret:l,type:"merge-block"})}}else{if(s.type==="merge-block")break;if(tc(l)){if(we(l.origin)){if(l.origin.isInline()){if(!l.origin.isParentOf(o.anchor.origin))break}else s={block:l.origin,type:"merge-next-block"};continue}if(Gt(l.origin)){if(!l.origin.isIsolated())if(s.type==="merge-next-block"&&(l.origin.isKeyboardSelectable()||!l.origin.isInline())&&we(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const u=aI();u.add(l.origin.getKey()),Br(u)}else l.origin.remove();return}break}}if(s.type==="merge-block"){const{caret:l,block:u}=s;return ig(this,Qa(!l.origin.isEmpty()&&u.isEmpty()?J0(Cr(u,l.direction)):o.anchor,l)),this.removeText()}}const a=this.focus;if(this.modify("extend",e,"character"),this.isCollapsed()){if(e&&r.offset===0&&OE(this,r.getNode()))return}else{const s=a.type==="text"?a.getNode():null;if(i=r.type==="text"?r.getNode():null,s!==null&&s.isSegmented()){const l=a.offset,u=s.getTextContentSize();if(s.is(i)||e&&l!==u||!e&&l!==0)return void LE(s,e,l)}else if(i!==null&&i.isSegmented()){const l=r.offset,u=i.getTextContentSize();if(i.is(s)||e&&l!==0||!e&&l!==u)return void LE(i,e,l)}(function(l,u){const d=l.anchor,f=l.focus,h=d.getNode(),p=f.getNode();if(h===p&&d.type==="text"&&f.type==="text"){const g=d.offset,m=f.offset,v=g<m,b=v?g:m,y=v?m:g,w=y-1;b!==w&&(function(x){return!(yI(x)||KK(x))})(h.getTextContent().slice(b,y))&&(u?f.set(f.key,w,f.type):d.set(d.key,w,d.type))}})(this,e)}}if(this.removeText(),e&&!n&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const r=this.anchor.getNode();r.isEmpty()&&ur(r.getParent())&&r.getPreviousSibling()===null&&OE(this,r)}}deleteLine(e){this.isCollapsed()&&this.modify("extend",e,"lineboundary"),this.isCollapsed()?this.deleteCharacter(e):this.removeText()}deleteWord(e){if(this.isCollapsed()){const n=this.anchor,r=n.getNode();if(this.forwardDeletion(n,r,e))return;this.modify("extend",e,"word")}this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function ai(t){return t instanceof rv}function PE(t){const e=t.offset;if(t.type==="text")return e;const n=t.getNode();return e===n.getChildrenSize()?n.getTextContent().length:0}function jy(t){const e=t.getStartEndPoints();if(e===null)return[0,0];const[n,r]=e;return n.type==="element"&&r.type==="element"&&n.key===r.key&&n.offset===r.offset?[0,0]:[PE(n),PE(r)]}function OE(t,e){for(let n=e;n;n=n.getParent()){if(we(n)){if(n.collapseAtStart(t))return!0;if(Yi(n))break}if(n.getPreviousSibling())break}return!1}const KK=(()=>{try{const t=new RegExp("\\p{Emoji}","u"),e=t.test.bind(t);if(e("❤️")&&e("#️⃣")&&e("👍"))return e}catch{}return()=>!1})();function LE(t,e,n){const r=t,i=r.getTextContent().split(/(?=\s)/g),o=i.length;let a=0,s=0;for(let u=0;u<o;u++){const d=u===o-1;if(s=a,a+=i[u].length,e&&a===n||a>n||d){i.splice(u,1),d&&(s=void 0);break}}const l=i.join("").trim();l===""?r.remove():(r.setTextContent(l),r.select(s,s))}function IE(t,e,n,r){let i,o=e;if(In(t)){let a=!1;const s=t.childNodes,l=s.length,u=r._blockCursorElement;o===l&&(a=!0,o=l-1);let d=s[o],f=!1;if(d===u)d=s[o+1],f=!0;else if(u!==null){const h=u.parentNode;t===h&&e>Array.prototype.indexOf.call(h.children,u)&&o--}if(i=Qc(d),Ye(i))o=Is(i,a?"next":"previous");else{let h=Qc(t);if(h===null)return null;if(we(h)){const p=r.getElementByKey(h.getKey());p===null&&Be(214),[h,o]=h.getDOMSlot(p).resolveChildIndex(h,p,t,e),we(h)||Be(215),a&&o>=h.getChildrenSize()&&(o=Math.max(0,h.getChildrenSize()-1));let m=h.getChildAtIndex(o);if(we(m)&&(function(v,b,y){const w=v.getParent();return y===null||w===null||!w.canBeEmpty()||w!==y.getNode()})(m,0,n)){const v=a?m.getLastDescendant():m.getFirstDescendant();v===null?h=m:(m=v,h=we(m)?m:m.getParentOrThrow()),o=0}Ye(m)?(i=m,h=null,o=Is(m,a?"next":"previous")):m!==h&&a&&!f&&(we(h)||Be(216),o=Math.min(h.getChildrenSize(),o+1))}else{const p=h.getIndexWithinParent();o=e===0&&Gt(h)&&Qc(t)===h?p:p+1,h=h.getParentOrThrow()}if(we(h))return Ri(h.__key,o,"element")}}else i=Qc(t);return Ye(i)?Ri(i.__key,Is(i,o,"clamp"),"text"):null}function NE(t,e,n){const r=t.offset,i=t.getNode();if(r===0){const o=i.getPreviousSibling(),a=i.getParent();if(e){if((n||!e)&&o===null&&we(a)&&a.isInline()){const s=a.getPreviousSibling();Ye(s)&&t.set(s.__key,s.getTextContent().length,"text")}}else we(o)&&!n&&o.isInline()?t.set(o.__key,o.getChildrenSize(),"element"):Ye(o)&&t.set(o.__key,o.getTextContent().length,"text")}else if(r===i.getTextContent().length){const o=i.getNextSibling(),a=i.getParent();if(e&&we(o)&&o.isInline())t.set(o.__key,0,"element");else if((n||e)&&o===null&&we(a)&&a.isInline()&&!a.canInsertTextAfter()){const s=a.getNextSibling();Ye(s)&&t.set(s.__key,0,"text")}}}function rI(t,e,n){if(t.type==="text"&&e.type==="text"){const r=t.isBefore(e),i=t.is(e);NE(t,r,i),NE(e,!r,i),i&&e.set(t.key,t.offset,t.type);const o=Vn();if(o.isComposing()&&o._compositionKey!==t.key&&De(n)){const a=n.anchor,s=n.focus;t.set(a.key,a.offset,a.type,!0),e.set(s.key,s.offset,s.type,!0)}}}function iI(t,e,n,r,i,o){if(t===null||n===null||!Gh(i,t,n))return null;const a=IE(t,e,De(o)?o.anchor:null,i);if(a===null)return null;const s=IE(n,r,De(o)?o.focus:null,i);if(s===null)return null;if(a.type==="element"&&s.type==="element"){const l=Qc(t),u=Qc(n);if(Gt(l)&&Gt(u))return null}return rI(a,s,o),[a,s]}function Uy(t){return we(t)&&!t.isInline()}function oI(t,e,n,r,i,o){const a=tl(),s=new yc(Ri(t,e,i),Ri(n,r,o),0,"");return s.dirty=!0,a._selection=s,s}function iv(){const t=Ri("root",0,"element"),e=Ri("root",0,"element");return new yc(t,e,0,"")}function aI(){return new rv(new Set)}function C0(t,e,n,r){const i=n._window;if(i===null)return null;const o=r||i.event,a=o?o.type:void 0,s=a==="selectionchange",l=!xy&&(s||a==="beforeinput"||a==="compositionstart"||a==="compositionend"||a==="click"&&o&&o.detail===3||a==="drop"||a===void 0);let u,d,f,h;if(De(t)&&!l)return t.clone();if(e===null)return null;if(u=e.anchorNode,d=e.focusNode,f=e.anchorOffset,h=e.focusOffset,(s||a===void 0)&&De(t)&&!Gh(n,u,d))return t.clone();const p=iI(u,f,d,h,n,t);if(p===null)return null;const[g,m]=p;return new yc(g,m,De(t)?t.format:0,De(t)?t.style:"")}function Ge(){return tl()._selection}function wc(){return Vn()._editorState._selection}function qg(t,e,n,r=1){const i=t.anchor,o=t.focus,a=i.getNode(),s=o.getNode();if(!e.is(a)&&!e.is(s))return;const l=e.__key;if(t.isCollapsed()){const u=i.offset;if(n<=u&&r>0||n<u&&r<0){const d=Math.max(0,u+r);i.set(l,d,"element"),o.set(l,d,"element"),RE(t)}}else{const u=t.isBackward(),d=u?o:i,f=d.getNode(),h=u?i:o,p=h.getNode();if(e.is(f)){const g=d.offset;(n<=g&&r>0||n<g&&r<0)&&d.set(l,Math.max(0,g+r),"element")}if(e.is(p)){const g=h.offset;(n<=g&&r>0||n<g&&r<0)&&h.set(l,Math.max(0,g+r),"element")}}RE(t)}function RE(t){const e=t.anchor,n=e.offset,r=t.focus,i=r.offset,o=e.getNode(),a=r.getNode();if(t.isCollapsed()){if(!we(o))return;const s=o.getChildrenSize(),l=n>=s,u=l?o.getChildAtIndex(s-1):o.getChildAtIndex(n);if(Ye(u)){let d=0;l&&(d=u.getTextContentSize()),e.set(u.__key,d,"text"),r.set(u.__key,d,"text")}return}if(we(o)){const s=o.getChildrenSize(),l=n>=s,u=l?o.getChildAtIndex(s-1):o.getChildAtIndex(n);if(Ye(u)){let d=0;l&&(d=u.getTextContentSize()),e.set(u.__key,d,"text")}}if(we(a)){const s=a.getChildrenSize(),l=i>=s,u=l?a.getChildAtIndex(s-1):a.getChildAtIndex(i);if(Ye(u)){let d=0;l&&(d=u.getTextContentSize()),r.set(u.__key,d,"text")}}}function Hg(t,e,n,r,i){let o=null,a=0,s=null;r!==null?(o=r.__key,Ye(r)?(a=r.getTextContentSize(),s="text"):we(r)&&(a=r.getChildrenSize(),s="element")):i!==null&&(o=i.__key,Ye(i)?s="text":we(i)&&(s="element")),o!==null&&s!==null?t.set(o,a,s):(a=e.getIndexWithinParent(),a===-1&&(a=n.getChildrenSize()),t.set(n.__key,a,"element"))}function ME(t,e,n,r,i){t.type==="text"?t.set(n,t.offset+(e?0:i),"text"):t.offset>r.getIndexWithinParent()&&t.set(t.key,t.offset-1,"element")}function sI(t,e,n,r,i){try{t.setBaseAndExtent(e,n,r,i)}catch{}}function VK(t,e,n,r,i,o,a){const s=r.anchorNode,l=r.focusNode,u=r.anchorOffset,d=r.focusOffset,f=document.activeElement;if(i.has(NK)&&f!==o||f!==null&&M0(f))return;if(!De(e))return void(t!==null&&Gh(n,s,l)&&r.removeAllRanges());const h=e.anchor,p=e.focus,g=h.key,m=p.key,v=Zl(n,g),b=Zl(n,m),y=h.offset,w=p.offset,x=e.format,E=e.style,$=e.isCollapsed();let A=v,k=b,T=!1;if(h.type==="text"){A=Fu(v);const D=h.getNode();T=D.getFormat()!==x||D.getStyle()!==E}else De(t)&&t.anchor.type==="text"&&(T=!0);var C,P,O,I,L;if(p.type==="text"&&(k=Fu(b)),A!==null&&k!==null&&($&&(t===null||T||De(t)&&(t.format!==x||t.style!==E))&&(C=x,P=E,O=y,I=g,L=performance.now(),WL=[C,P,O,I,L]),u!==y||d!==w||s!==A||l!==k||r.type==="Range"&&$||(f!==null&&o.contains(f)||i.has(DK)||o.focus({preventScroll:!0}),h.type==="element"))){if(sI(r,A,y,k,w),!i.has(RK)&&e.isCollapsed()&&o!==null&&o===document.activeElement){const D=De(e)&&e.anchor.type==="element"?A.childNodes[y]||null:r.rangeCount>0?r.getRangeAt(0):null;if(D!==null){let B;if(D instanceof Text){const K=document.createRange();K.selectNode(D),B=K.getBoundingClientRect()}else B=D.getBoundingClientRect();(function(K,G,W){const Y=SI(W),R=B0(Y);if(Y===null||R===null)return;let{top:q,bottom:J}=G,Q=0,ee=0,re=W;for(;re!==null;){const te=re===Y.body;if(te)Q=0,ee=bo(K).innerHeight;else{const he=re.getBoundingClientRect();Q=he.top,ee=he.bottom}let de=0;if(q<Q?de=-(Q-q):J>ee&&(de=J-ee),de!==0)if(te)R.scrollBy(0,de);else{const he=re.scrollTop;re.scrollTop+=de;const ue=re.scrollTop-he;q-=ue,J-=ue}if(te)break;re=Wh(re)}})(n,B,o)}}My=!0}}function yd(t){let e=Ge()||wc();e===null&&(e=ar().selectEnd()),e.insertNodes(t)}function GK(){const t=Ge();return t===null?"":t.getTextContent()}function E_(t){let e=t;t.isCollapsed()||e.removeText();const n=Ge();De(n)&&(e=n),De(e)||Be(161);const r=e.anchor;let i=r.getNode(),o=r.offset;for(;!fo(i);){const a=i;if([i,o]=WK(i,o),a.is(i))break}return o}function WK(t,e){const n=t.getParent();if(!n){const i=Tn();return ar().append(i),i.select(),[ar(),0]}if(Ye(t)){const i=t.splitText(e);if(i.length===0)return[n,t.getIndexWithinParent()];const o=e===0?0:1;return[n,i[0].getIndexWithinParent()+o]}if(!we(t)||e===0)return[n,t.getIndexWithinParent()];const r=t.getChildAtIndex(e);if(r){const i=new yc(Ri(t.__key,e,"element"),Ri(t.__key,e,"element"),0,""),o=t.insertNewAfter(i);o&&o.append(r,...r.getNextSiblings())}return[n,t.getIndexWithinParent()+1]}function DE(t,e,n,r,i="decorators-and-blocks"){if(e==="move"&&r==="character"&&!t.isCollapsed()){const[d,f]=n===t.isBackward()?[t.focus,t.anchor]:[t.anchor,t.focus];return f.set(d.key,d.offset,d.type),!0}const o=es(t.focus,n?"previous":"next"),a=r==="lineboundary",s=e==="move";let l=o,u=i==="decorators-and-blocks";if(!PI(l)){for(const d of l){u=!1;const{origin:f}=d;if(!Gt(f)||f.isIsolated()||(l=d,!a||!f.isInline()))break}if(u)for(const d of W0(o).iterNodeCarets(e==="extend"?"shadowRoot":"root")){if(pa(d))d.origin.isInline()||(l=d);else{if(we(d.origin))continue;Gt(d.origin)&&!d.origin.isInline()&&(l=d)}break}}if(l===o)return!1;if(s&&!a&&Gt(l.origin)&&l.origin.isKeyboardSelectable()){const d=aI();return d.add(l.origin.getKey()),Br(d),!0}return l=Lo(l),s&&ch(t.anchor,l),ch(t.focus,l),u||!a}let $r=null,Ar=null,Li=!1,T_=!1,ng=0;const FE={characterData:!0,childList:!0,subtree:!0};function Hh(){return Li||$r!==null&&$r._readOnly}function Tr(){Li&&Be(13)}function lI(){ng>99&&Be(14)}function tl(){return $r===null&&Be(195,cI()),$r}function Vn(){return Ar===null&&Be(196,cI()),Ar}function cI(){let t=0;const e=new Set,n=Du.version;if(typeof window<"u")for(const i of document.querySelectorAll("[contenteditable]")){const o=sv(i);if(D0(o))t++;else if(o){let a=String(o.constructor.version||"<0.17.1");a===n&&(a+=" (separately built, likely a bundler configuration issue)"),e.add(a)}}let r=` Detected on the page: ${t} compatible editor(s) with version ${n}`;return e.size&&(r+=` and incompatible editors with versions ${Array.from(e).join(", ")}`),r}function YK(){return Ar}function zE(t,e,n){const r=e.__type,i=gI(t,r);let o=n.get(r);o===void 0&&(o=Array.from(i.transforms),n.set(r,o));const a=o.length;for(let s=0;s<a&&(o[s](e),e.isAttached());s++);}function jE(t,e){return t!==void 0&&t.__key!==e&&t.isAttached()}function uI(t,e){if(!e)return;const n=t._updateTags;let r=e;Array.isArray(e)||(r=[e]);for(const i of r)n.add(i)}function JK(t){return P0(t,Vn()._nodes)}function P0(t,e){const n=t.type,r=e.get(n);r===void 0&&Be(17,n);const i=r.klass;t.type!==i.getType()&&Be(18,i.name);const o=i.importJSON(t),a=t.children;if(we(o)&&Array.isArray(a))for(let s=0;s<a.length;s++){const l=P0(a[s],e);o.append(l)}return o}function UE(t,e,n){const r=$r,i=Li,o=Ar;$r=e,Li=!0,Ar=t;try{return n()}finally{$r=r,Li=i,Ar=o}}function Fa(t,e){const n=t._pendingEditorState,r=t._rootElement,i=t._headless||r===null;if(n===null)return;const o=t._editorState,a=o._selection,s=n._selection,l=t._dirtyType!==0,u=$r,d=Li,f=Ar,h=t._updating,p=t._observer;let g=null;if(t._pendingEditorState=null,t._editorState=n,!i&&l&&p!==null){Ar=t,$r=n,Li=!1,t._updating=!0;try{const $=t._dirtyType,A=t._dirtyElements,k=t._dirtyLeaves;p.disconnect(),g=xK(o,n,t,$,A,k)}catch($){if($ instanceof Error&&t._onError($),T_)throw $;return hI(t,null,r,n),EL(t),t._dirtyType=2,T_=!0,Fa(t,o),void(T_=!1)}finally{p.observe(r,FE),t._updating=h,$r=u,Li=d,Ar=f}}n._readOnly||(n._readOnly=!0);const m=t._dirtyLeaves,v=t._dirtyElements,b=t._normalizedNodes,y=t._updateTags,w=t._deferred;l&&(t._dirtyType=0,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements=new Map,t._normalizedNodes=new Set,t._updateTags=new Set),(function($,A){const k=$._decorators;let T=$._pendingDecorators||k;const C=A._nodeMap;let P;for(P in T)C.has(P)||(T===k&&(T=_I($)),delete T[P])})(t,n);const x=i?null:Bo(bo(t));if(t._editable&&x!==null&&(l||s===null||s.dirty||!s.is(a))&&r!==null&&!y.has(MK)){Ar=t,$r=n;try{if(p!==null&&p.disconnect(),l||s===null||s.dirty){const $=t._blockCursorElement;$!==null&&Ky($,t,r),VK(a,s,t,x,y,r)}(function($,A,k){let T=$._blockCursorElement;if(De(k)&&k.isCollapsed()&&k.anchor.type==="element"&&A.contains(document.activeElement)){const C=k.anchor,P=C.getNode(),O=C.offset;let I=!1,L=null;if(O===P.getChildrenSize())A_(P.getChildAtIndex(O-1))&&(I=!0);else{const D=P.getChildAtIndex(O);if(D!==null&&A_(D)){const B=D.getPreviousSibling();(B===null||A_(B))&&(I=!0,L=$.getElementByKey(D.__key))}}if(I){const D=$.getElementByKey(P.__key);return T===null&&($._blockCursorElement=T=(function(B){const K=B.theme,G=document.createElement("div");G.contentEditable="false",G.setAttribute("data-lexical-cursor","true");let W=K.blockCursor;if(W!==void 0){if(typeof W=="string"){const Y=_L(W);W=K.blockCursor=Y}W!==void 0&&G.classList.add(...W)}return G})($._config)),A.style.caretColor="transparent",void(L===null?D.appendChild(T):D.insertBefore(T,L))}}T!==null&&Ky(T,$,A)})(t,r,s)}finally{p!==null&&p.observe(r,FE),Ar=f,$r=u}}g!==null&&(function($,A,k,T,C){const P=Array.from($._listeners.mutation),O=P.length;for(let I=0;I<O;I++){const[L,D]=P[I];for(const B of D){const K=A.get(B);K!==void 0&&L(K,{dirtyLeaves:T,prevEditorState:C,updateTags:k})}}})(t,g,y,m,o),De(s)||s===null||a!==null&&a.is(s)||t.dispatchCommand(NL,void 0);const E=t._pendingDecorators;E!==null&&(t._decorators=E,t._pendingDecorators=null,Af("decorator",t,!0,E)),(function($,A,k){const T=VE(A),C=VE(k);T!==C&&Af("textcontent",$,!0,C)})(t,e||o,n),Af("update",t,!0,{dirtyElements:v,dirtyLeaves:m,editorState:n,mutatedNodes:g,normalizedNodes:b,prevEditorState:e||o,tags:y}),(function($,A){if($._deferred=[],A.length!==0){const k=$._updating;$._updating=!0;try{for(let T=0;T<A.length;T++)A[T]()}finally{$._updating=k}}})(t,w),(function($){const A=$._updates;if(A.length!==0){const k=A.shift();if(k){const[T,C]=k;ov($,T,C)}}})(t)}function Af(t,e,n,...r){const i=e._updating;e._updating=n;try{const o=Array.from(e._listeners[t]);for(let a=0;a<o.length;a++)o[a].apply(null,r)}finally{e._updating=i}}function BE(t,e){const n=t._updates;let r=e||!1;for(;n.length!==0;){const i=n.shift();if(i){const[o,a]=i,s=t._pendingEditorState;let l;a!==void 0&&(l=a.onUpdate,a.skipTransforms&&(r=!0),a.discrete&&(s===null&&Be(191),s._flushSync=!0),l&&t._deferred.push(l),uI(t,a.tag)),s==null?ov(t,o,a):o()}}return r}function ov(t,e,n){const r=t._updateTags;let i,o=!1,a=!1;n!==void 0&&(i=n.onUpdate,uI(t,n.tag),o=n.skipTransforms||!1,a=n.discrete||!1),i&&t._deferred.push(i);const s=t._editorState;let l=t._pendingEditorState,u=!1;(l===null||l._readOnly)&&(l=t._pendingEditorState=dI(l||s),u=!0),l._flushSync=a;const d=$r,f=Li,h=Ar,p=t._updating;$r=l,Li=!1,t._updating=!0,Ar=t;const g=t._headless||t.getRootElement()===null;N0(null);try{u&&(g?s._selection!==null&&(l._selection=s._selection.clone()):l._selection=(function(y,w){const x=y.getEditorState()._selection,E=Bo(bo(y));return De(x)||x==null?C0(x,E,y,w):x.clone()})(t,n&&n.event||null));const v=t._compositionKey;e(),o=BE(t,o),(function(y,w){const x=w.getEditorState()._selection,E=y._selection;if(De(E)){const $=E.anchor,A=E.focus;let k;if($.type==="text"&&(k=$.getNode(),k.selectionTransform(x,E)),A.type==="text"){const T=A.getNode();k!==T&&T.selectionTransform(x,E)}}})(l,t),t._dirtyType!==0&&(o?(function(y,w){const x=w._dirtyLeaves,E=y._nodeMap;for(const $ of x){const A=E.get($);Ye(A)&&A.isAttached()&&A.isSimpleText()&&!A.isUnmergeable()&&bE(A)}})(l,t):(function(y,w){const x=w._dirtyLeaves,E=w._dirtyElements,$=y._nodeMap,A=ks(),k=new Map;let T=x,C=T.size,P=E,O=P.size;for(;C>0||O>0;){if(C>0){w._dirtyLeaves=new Set;for(const I of T){const L=$.get(I);Ye(L)&&L.isAttached()&&L.isSimpleText()&&!L.isUnmergeable()&&bE(L),L!==void 0&&jE(L,A)&&zE(w,L,k),x.add(I)}if(T=w._dirtyLeaves,C=T.size,C>0){ng++;continue}}w._dirtyLeaves=new Set,w._dirtyElements=new Map,P.delete("root")&&P.set("root",!0);for(const I of P){const L=I[0],D=I[1];if(E.set(L,D),!D)continue;const B=$.get(L);B!==void 0&&jE(B,A)&&zE(w,B,k)}T=w._dirtyLeaves,C=T.size,P=w._dirtyElements,O=P.size,ng++}w._dirtyLeaves=x,w._dirtyElements=E})(l,t),BE(t),(function(y,w,x,E){const $=y._nodeMap,A=w._nodeMap,k=[];for(const[T]of E){const C=A.get(T);C!==void 0&&(C.isAttached()||(we(C)&&xL(C,T,$,A,k,E),$.has(T)||E.delete(T),k.push(T)))}for(const T of k)A.delete(T);for(const T of x){const C=A.get(T);C===void 0||C.isAttached()||($.has(T)||x.delete(T),A.delete(T))}})(s,l,t._dirtyLeaves,t._dirtyElements)),v!==t._compositionKey&&(l._flushSync=!0);const b=l._selection;if(De(b)){const y=l._nodeMap,w=b.anchor.key,x=b.focus.key;y.get(w)!==void 0&&y.get(x)!==void 0||Be(19)}else ai(b)&&b._nodes.size===0&&(l._selection=null)}catch(v){return v instanceof Error&&t._onError(v),t._pendingEditorState=s,t._dirtyType=2,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements.clear(),void Fa(t)}finally{$r=d,Li=f,Ar=h,t._updating=p,ng=0}t._dirtyType!==0||t._deferred.length>0||(function(v,b){const y=b.getEditorState()._selection,w=v._selection;if(w!==null){if(w.dirty||!w.is(y))return!0}else if(y!==null)return!0;return!1})(l,t)?l._flushSync?(l._flushSync=!1,Fa(t)):u&&nV(()=>{Fa(t)}):(l._flushSync=!1,u&&(r.clear(),t._deferred=[],t._pendingEditorState=null))}function Ui(t,e,n){Ar===t&&n===void 0?e():ov(t,e,n)}class Cf{element;before;after;constructor(e,n,r){this.element=e,this.before=n||null,this.after=r||null}withBefore(e){return new Cf(this.element,e,this.after)}withAfter(e){return new Cf(this.element,this.before,e)}withElement(e){return this.element===e?this:new Cf(e,this.before,this.after)}insertChild(e){const n=this.before||this.getManagedLineBreak();return n!==null&&n.parentElement!==this.element&&Be(222),this.element.insertBefore(e,n),this}removeChild(e){return e.parentElement!==this.element&&Be(223),this.element.removeChild(e),this}replaceChild(e,n){return n.parentElement!==this.element&&Be(224),this.element.replaceChild(e,n),this}getFirstChild(){const e=this.after?this.after.nextSibling:this.element.firstChild;return e===this.before||e===this.getManagedLineBreak()?null:e}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(e){if(e===null)this.removeManagedLineBreak();else{const n=e==="decorator"&&(nh||Nu||th);this.insertManagedLineBreak(n)}}removeManagedLineBreak(){const e=this.getManagedLineBreak();if(e){const n=this.element,r=e.nodeName==="IMG"?e.nextSibling:null;r&&n.removeChild(r),n.removeChild(e),n.__lexicalLineBreak=void 0}}insertManagedLineBreak(e){const n=this.getManagedLineBreak();if(n){if(e===(n.nodeName==="IMG"))return;this.removeManagedLineBreak()}const r=this.element,i=this.before,o=document.createElement("br");if(r.insertBefore(o,i),e){const a=document.createElement("img");a.setAttribute("data-lexical-linebreak","true"),a.style.cssText="display: inline !important; border: 0px !important; margin: 0px !important;",a.alt="",r.insertBefore(a,o),r.__lexicalLineBreak=a}else r.__lexicalLineBreak=o}getFirstChildOffset(){let e=0;for(let n=this.after;n!==null;n=n.previousSibling)e++;return e}resolveChildIndex(e,n,r,i){if(r===this.element){const l=this.getFirstChildOffset();return[e,Math.min(l+e.getChildrenSize(),Math.max(l,i))]}const o=qE(n,r);o.push(i);const a=qE(n,this.element);let s=e.getIndexWithinParent();for(let l=0;l<a.length;l++){const u=o[l],d=a[l];if(u===void 0||u<d)break;if(u>d){s+=1;break}}return[e.getParentOrThrow(),s]}}function qE(t,e){const n=[];let r=e;for(;r!==t&&r!==null;r=r.parentNode){let i=0;for(let o=r.previousSibling;o!==null;o=o.previousSibling)i++;n.push(i)}return r!==t&&Be(225),n.reverse()}class ir extends ha{__first;__last;__size;__format;__style;__indent;__dir;__textFormat;__textStyle;constructor(e){super(e),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle=""}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__first=e.__first,this.__last=e.__last,this.__size=e.__size),this.__indent=e.__indent,this.__format=e.__format,this.__style=e.__style,this.__dir=e.__dir,this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){const e=this.getFormat();return lK[e]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const e=[];let n=this.getFirstChild();for(;n!==null;)e.push(n),n=n.getNextSibling();return e}getChildrenKeys(){const e=[];let n=this.getFirstChild();for(;n!==null;)e.push(n.__key),n=n.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){const e=Vn()._dirtyElements;return e!==null&&e.has(this.__key)}isLastChild(){const e=this.getLatest(),n=this.getParentOrThrow().getLastChild();return n!==null&&n.is(e)}getAllTextNodes(){const e=[];let n=this.getFirstChild();for(;n!==null;){if(Ye(n)&&e.push(n),we(n)){const r=n.getAllTextNodes();e.push(...r)}n=n.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;we(e);){const n=e.getFirstChild();if(n===null)break;e=n}return e}getLastDescendant(){let e=this.getLastChild();for(;we(e);){const n=e.getLastChild();if(n===null)break;e=n}return e}getDescendantByIndex(e){const n=this.getChildren(),r=n.length;if(e>=r){const o=n[r-1];return we(o)&&o.getLastDescendant()||o||null}const i=n[e];return we(i)&&i.getFirstDescendant()||i||null}getFirstChild(){const e=this.getLatest().__first;return e===null?null:qn(e)}getFirstChildOrThrow(){const e=this.getFirstChild();return e===null&&Be(45,this.__key),e}getLastChild(){const e=this.getLatest().__last;return e===null?null:qn(e)}getLastChildOrThrow(){const e=this.getLastChild();return e===null&&Be(96,this.__key),e}getChildAtIndex(e){const n=this.getChildrenSize();let r,i;if(e<n/2){for(r=this.getFirstChild(),i=0;r!==null&&i<=e;){if(i===e)return r;r=r.getNextSibling(),i++}return null}for(r=this.getLastChild(),i=n-1;r!==null&&i>=e;){if(i===e)return r;r=r.getPreviousSibling(),i--}return null}getTextContent(){let e="";const n=this.getChildren(),r=n.length;for(let i=0;i<r;i++){const o=n[i];e+=o.getTextContent(),we(o)&&i!==r-1&&!o.isInline()&&(e+=js)}return e}getTextContentSize(){let e=0;const n=this.getChildren(),r=n.length;for(let i=0;i<r;i++){const o=n[i];e+=o.getTextContentSize(),we(o)&&i!==r-1&&!o.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(e){if(e!==""){const n=dE[e];return(this.getFormat()&n)!==0}return!1}hasTextFormat(e){const n=Yl[e];return(this.getTextFormat()&n)!==0}getFormatFlags(e,n){return Kg(this.getLatest().__textFormat,e,n)}getTextStyle(){return this.getLatest().__textStyle}select(e,n){Tr();const r=Ge();let i=e,o=n;const a=this.getChildrenSize();if(!this.canBeEmpty()){if(e===0&&n===0){const l=this.getFirstChild();if(Ye(l)||we(l))return l.select(0,0)}else if(!(e!==void 0&&e!==a||n!==void 0&&n!==a)){const l=this.getLastChild();if(Ye(l)||we(l))return l.select()}}i===void 0&&(i=a),o===void 0&&(o=a);const s=this.__key;return De(r)?(r.anchor.set(s,i,"element"),r.focus.set(s,o,"element"),r.dirty=!0,r):oI(s,i,s,o,"element","element")}selectStart(){const e=this.getFirstDescendant();return e?e.selectStart():this.select()}selectEnd(){const e=this.getLastDescendant();return e?e.selectEnd():this.select()}clear(){const e=this.getWritable();return this.getChildren().forEach(n=>n.remove()),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){const n=this.getWritable();return n.__dir=e,n}setFormat(e){return this.getWritable().__format=e!==""?dE[e]:0,this}setStyle(e){return this.getWritable().__style=e||"",this}setTextFormat(e){const n=this.getWritable();return n.__textFormat=e,n}setTextStyle(e){const n=this.getWritable();return n.__textStyle=e,n}setIndent(e){return this.getWritable().__indent=e,this}splice(e,n,r){Bg(this)&&Be(324,this.__key,this.__type);const i=this.getChildrenSize(),o=this.getWritable();e+n<=i||Be(226,String(e),String(n),String(i));const a=o.__key,s=[],l=[],u=this.getChildAtIndex(e+n);let d=null,f=i-n+r.length;if(e!==0)if(e===i)d=this.getLastChild();else{const p=this.getChildAtIndex(e);p!==null&&(d=p.getPreviousSibling())}if(n>0){let p=d===null?this.getFirstChild():d.getNextSibling();for(let g=0;g<n;g++){p===null&&Be(100);const m=p.getNextSibling(),v=p.__key;Cl(p.getWritable()),l.push(v),p=m}}let h=d;for(const p of r){h!==null&&p.is(h)&&(d=h=h.getPreviousSibling());const g=p.getWritable();g.__parent===a&&f--,Cl(g);const m=p.__key;if(h===null)o.__first=m,g.__prev=null;else{const v=h.getWritable();v.__next=m,g.__prev=v.__key}p.__key===a&&Be(76),g.__parent=a,s.push(m),h=p}if(e+n===i)h!==null&&(h.getWritable().__next=null,o.__last=h.__key);else if(u!==null){const p=u.getWritable();if(h!==null){const g=h.getWritable();p.__prev=h.__key,g.__next=u.__key}else p.__prev=null}if(o.__size=f,l.length){const p=Ge();if(De(p)){const g=new Set(l),m=new Set(s),{anchor:v,focus:b}=p;HE(v,g,m)&&Hg(v,v.getNode(),this,d,u),HE(b,g,m)&&Hg(b,b.getNode(),this,d,u),f!==0||this.canBeEmpty()||Yi(this)||this.remove()}}return o}getDOMSlot(e){return new Cf(e)}exportDOM(e){const{element:n}=super.exportDOM(e);if(In(n)){const r=this.getIndent();r>0&&(n.style.paddingInlineStart=40*r+"px");const i=this.getDirection();i&&(n.dir=i)}return{element:n}}exportJSON(){const e={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},n=this.getTextFormat(),r=this.getTextStyle();return n!==0&&(e.textFormat=n),r!==""&&(e.textStyle=r),e}updateFromJSON(e){return super.updateFromJSON(e).setFormat(e.format).setIndent(e.indent).setDirection(e.direction).setTextFormat(e.textFormat||0).setTextStyle(e.textStyle||"")}insertNewAfter(e,n){return null}canIndent(){return!0}collapseAtStart(e){return!1}excludeFromCopy(e){return!1}canReplaceWith(e){return!0}canInsertAfter(e){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(e){return!1}extractWithChild(e,n,r){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(e,n){const r=this.getDOMSlot(e);let i=r.getFirstChild();for(let o=this.getFirstChild();o;o=o.getNextSibling()){const a=n.getElementByKey(o.getKey());a!==null&&(i==null?(r.insertChild(a),i=a):i!==a&&r.replaceChild(a,i),i=i.nextSibling)}}}function we(t){return t instanceof ir}function HE(t,e,n){let r=t.getNode();for(;r;){const i=r.__key;if(e.has(i)&&!n.has(i))return!0;r=r.getParent()}return!1}class O0 extends ha{decorate(e,n){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function Gt(t){return t instanceof O0}class wd extends ir{__cachedText;static getType(){return"root"}static clone(){return new wd}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){Be(51)}getTextContent(){const e=this.__cachedText;return!Hh()&&Vn()._dirtyType!==0||e===null?super.getTextContent():e}remove(){Be(52)}replace(e){Be(53)}insertBefore(e){Be(54)}insertAfter(e){Be(55)}updateDOM(e,n){return!1}splice(e,n,r){for(const i of r)we(i)||Gt(i)||Be(282);return super.splice(e,n,r)}static importJSON(e){return ar().updateFromJSON(e)}collapseAtStart(){return!0}}function ur(t){return t instanceof wd}function dI(t){return new Kh(new Map(t._nodeMap))}function L0(){return new Kh(new Map([["root",new wd]]))}function fI(t){const e=t.exportJSON(),n=t.constructor;if(e.type!==n.getType()&&Be(130,n.name),we(t)){const r=e.children;Array.isArray(r)||Be(59,n.name);const i=t.getChildren();for(let o=0;o<i.length;o++){const a=fI(i[o]);r.push(a)}}return e}function XK(t){return t instanceof Kh}class Kh{_nodeMap;_selection;_flushSync;_readOnly;constructor(e,n){this._nodeMap=e,this._selection=n||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(e,n){return UE(n&&n.editor||null,this,e)}clone(e){const n=new Kh(this._nodeMap,e===void 0?this._selection:e);return n._readOnly=!0,n}toJSON(){return UE(null,this,()=>({root:fI(ar())}))}}class I0 extends ir{static getType(){return"artificial"}createDOM(e){return document.createElement("div")}}class xd extends ir{static getType(){return"paragraph"}static clone(e){return new xd(e.__key)}createDOM(e){const n=document.createElement("p"),r=su(e.theme,"paragraph");return r!==void 0&&n.classList.add(...r),n}updateDOM(e,n,r){return!1}static importDOM(){return{p:e=>({conversion:ZK,priority:0})}}exportDOM(e){const{element:n}=super.exportDOM(e);if(In(n)){this.isEmpty()&&n.append(document.createElement("br"));const r=this.getFormatType();r&&(n.style.textAlign=r)}return{element:n}}static importJSON(e){return Tn().updateFromJSON(e)}exportJSON(){return{...super.exportJSON(),textFormat:this.getTextFormat(),textStyle:this.getTextStyle()}}insertNewAfter(e,n){const r=Tn();r.setTextFormat(e.format),r.setTextStyle(e.style);const i=this.getDirection();return r.setDirection(i),r.setFormat(this.getFormatType()),r.setStyle(this.getStyle()),this.insertAfter(r,n),r}collapseAtStart(){const e=this.getChildren();if(e.length===0||Ye(e[0])&&e[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function ZK(t){const e=Tn();return t.style&&(e.setFormat(t.style.textAlign),q0(t,e)),{node:e}}function Tn(){return Di(new xd)}function Vh(t){return t instanceof xd}const jt=0,hs=1,cf=2,QK=4;function hI(t,e,n,r){const i=t._keyToDOMMap;i.clear(),t._editorState=L0(),t._pendingEditorState=r,t._compositionKey=null,t._dirtyType=0,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements.clear(),t._normalizedNodes=new Set,t._updateTags=new Set,t._updates=[],t._blockCursorElement=null;const o=t._observer;o!==null&&(o.disconnect(),t._observer=null),e!==null&&(e.textContent=""),n!==null&&(n.textContent="",i.set("root",n))}function eV(t){const e=new Set,n=new Set;let r=t;for(;r;){const{ownNodeConfig:i}=uv(r),o=r.transform;if(!n.has(o)){n.add(o);const a=r.transform();a&&e.add(a)}if(i){const a=i.$transform;a&&e.add(a),r=i.extends}else{const a=Object.getPrototypeOf(r);r=a.prototype instanceof ha&&a!==ha?a:void 0}}return e}function pI(t){const e=t||{},n=YK(),r=e.theme||{},i=t===void 0?n:e.parentEditor||null,o=e.disableEvents||!1,a=L0(),s=e.namespace||(i!==null?i._config.namespace:wI()),l=e.editorState,u=[wd,cs,_d,bd,xd,I0,...e.nodes||[]],{onError:d,html:f}=e,h=e.editable===void 0||e.editable;let p;if(t===void 0&&n!==null)p=n._nodes;else{p=new Map;for(let m=0;m<u.length;m++){let v=u[m],b=null,y=null;if(typeof v!="function"){const E=v;v=E.replace,b=E.with,y=E.withKlass||null}uv(v);const w=v.getType(),x=eV(v);p.set(w,{exportDOM:f&&f.export?f.export.get(v):void 0,klass:v,replace:b,replaceWithKlass:y,sharedNodeState:vK(u[m]),transforms:x})}}const g=new Du(a,i,p,{disableEvents:o,namespace:s,theme:r},d||console.error,(function(m,v){const b=new Map,y=new Set,w=x=>{Object.keys(x).forEach(E=>{let $=b.get(E);$===void 0&&($=[],b.set(E,$)),$.push(x[E])})};return m.forEach(x=>{const E=x.klass.importDOM;if(E==null||y.has(E))return;y.add(E);const $=E.call(x.klass);$!==null&&w($)}),v&&w(v),b})(p,f?f.import:void 0),h,t);return l!==void 0&&(g._pendingEditorState=l,g._dirtyType=2),g}class Du{static version;_headless;_parentEditor;_rootElement;_editorState;_pendingEditorState;_compositionKey;_deferred;_keyToDOMMap;_updates;_updating;_listeners;_commands;_nodes;_decorators;_pendingDecorators;_config;_dirtyType;_cloneNotNeeded;_dirtyLeaves;_dirtyElements;_normalizedNodes;_updateTags;_observer;_key;_onError;_htmlConversions;_window;_editable;_blockCursorElement;_createEditorArgs;constructor(e,n,r,i,o,a,s,l){this._createEditorArgs=l,this._parentEditor=n,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=i,this._nodes=r,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=wI(),this._onError=o,this._htmlConversions=a,this._editable=s,this._headless=n!==null&&n._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(e){const n=this._listeners.update;return n.add(e),()=>{n.delete(e)}}registerEditableListener(e){const n=this._listeners.editable;return n.add(e),()=>{n.delete(e)}}registerDecoratorListener(e){const n=this._listeners.decorator;return n.add(e),()=>{n.delete(e)}}registerTextContentListener(e){const n=this._listeners.textcontent;return n.add(e),()=>{n.delete(e)}}registerRootListener(e){const n=this._listeners.root;return e(this._rootElement,null),n.add(e),()=>{e(null,this._rootElement),n.delete(e)}}registerCommand(e,n,r){r===void 0&&Be(35);const i=this._commands;i.has(e)||i.set(e,[new Set,new Set,new Set,new Set,new Set]);const o=i.get(e);o===void 0&&Be(36,String(e));const a=o[r];return a.add(n),()=>{a.delete(n),o.every(s=>s.size===0)&&i.delete(e)}}registerMutationListener(e,n,r){const i=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,o=this._listeners.mutation;let a=o.get(n);a===void 0&&(a=new Set,o.set(n,a)),a.add(i);const s=r&&r.skipInitialization;return s!==void 0&&s||this.initializeMutationListener(n,i),()=>{a.delete(i),a.size===0&&o.delete(n)}}getRegisteredNode(e){const n=this._nodes.get(e.getType());return n===void 0&&Be(37,e.name),n}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,n){const r=this._editorState,i=QE(r).get(n.getType());if(!i)return;const o=new Map;for(const a of i.keys())o.set(a,"created");o.size>0&&e(o,{dirtyLeaves:new Set,prevEditorState:r,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(e,n){const r=this.getRegisteredNode(e);return r.transforms.add(n),r}registerNodeTransform(e,n){const r=this.registerNodeTransformToKlass(e,n),i=[r],o=r.replaceWithKlass;if(o!=null){const a=this.registerNodeTransformToKlass(o,n);i.push(a)}return(function(a,s){const l=QE(a.getEditorState()),u=[];for(const d of s){const f=l.get(d);f&&u.push(f)}u.length!==0&&a.update(()=>{for(const d of u)for(const f of d.keys()){const h=qn(f);h&&h.markDirty()}},a._pendingEditorState===null?{tag:$f}:void 0)})(this,i.map(a=>a.klass.getType())),()=>{i.forEach(a=>a.transforms.delete(n))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,n){return tt(this,e,n)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){const n=this._rootElement;if(e!==n){const r=su(this._config.theme,"root"),i=this._pendingEditorState||this._editorState;if(this._rootElement=e,hI(this,n,e,i),n!==null&&(this._config.disableEvents||OK(n),r!=null&&n.classList.remove(...r)),e!==null){const o=B0(e),a=e.style;a.userSelect="text",a.whiteSpace="pre-wrap",a.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=o,this._dirtyType=2,EL(this),this._updateTags.add($f),Fa(this),this._config.disableEvents||(function(s,l){const u=s.ownerDocument;Ry.set(s,u);const d=Ug.get(u)??0;d<1&&u.addEventListener("selectionchange",QL),Ug.set(u,d+1),s.__lexicalEditor=l;const f=ZL(s);for(let h=0;h<Ny.length;h++){const[p,g]=Ny[h],m=typeof g=="function"?v=>{EE(v)||(SE(v),(l.isEditable()||p==="click")&&g(v,l))}:v=>{if(EE(v))return;SE(v);const b=l.isEditable();switch(p){case"cut":return b&&tt(l,$0,v);case"copy":return tt(l,nv,v);case"paste":return b&&tt(l,k0,v);case"dragstart":return b&&tt(l,HL,v);case"dragover":return b&&tt(l,KL,v);case"dragend":return b&&tt(l,EK,v);case"focus":return b&&tt(l,AK,v);case"blur":return b&&tt(l,CK,v);case"drop":return b&&tt(l,qL,v)}};s.addEventListener(p,m),f.push(()=>{s.removeEventListener(p,m)})}})(e,this),r!=null&&e.classList.add(...r)}else this._window=null,this._updateTags.add($f),Fa(this);Af("root",this,!1,e,n)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,n){e.isEmpty()&&Be(38);let r=e;r._readOnly&&(r=dI(e),r._selection=e._selection?e._selection.clone():null),SL(this);const i=this._pendingEditorState,o=this._updateTags,a=n!==void 0?n.tag:null;i===null||i.isEmpty()||(a!=null&&o.add(a),Fa(this)),this._pendingEditorState=r,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,a!=null&&o.add(a),this._updating||Fa(this)}parseEditorState(e,n){return(function(r,i,o){const a=L0(),s=$r,l=Li,u=Ar,d=i._dirtyElements,f=i._dirtyLeaves,h=i._cloneNotNeeded,p=i._dirtyType;i._dirtyElements=new Map,i._dirtyLeaves=new Set,i._cloneNotNeeded=new Set,i._dirtyType=0,$r=a,Li=!1,Ar=i,N0(null);try{const g=i._nodes;P0(r.root,g),o&&o(),a._readOnly=!0}catch(g){g instanceof Error&&i._onError(g)}finally{i._dirtyElements=d,i._dirtyLeaves=f,i._cloneNotNeeded=h,i._dirtyType=p,$r=s,Li=l,Ar=u}return a})(typeof e=="string"?JSON.parse(e):e,this,n)}read(e){return Fa(this),this.getEditorState().read(e,{editor:this})}update(e,n){(function(r,i,o){r._updating?r._updates.push([i,o]):ov(r,i,o)})(this,e,n)}focus(e,n={}){const r=this._rootElement;r!==null&&(r.setAttribute("autocapitalize","off"),Ui(this,()=>{const i=Ge(),o=ar();i!==null?i.dirty||Br(i.clone()):o.getChildrenSize()!==0&&(n.defaultSelection==="rootStart"?o.selectStart():o.selectEnd()),lV("focus"),cV(()=>{r.removeAttribute("autocapitalize"),e&&e()})}),this._pendingEditorState===null&&r.removeAttribute("autocapitalize"))}blur(){const e=this._rootElement;e!==null&&e.blur();const n=Bo(this._window);n!==null&&n.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,Af("editable",this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}}Du.version="0.38.2+prod.esm";let By=null;function N0(t){By=t}let tV=1;function gI(t,e){const n=R0(t,e);return n===void 0&&Be(30,e),n}function R0(t,e){return t._nodes.get(e)}const nV=typeof queueMicrotask=="function"?queueMicrotask:t=>{Promise.resolve().then(t)};function KE(t){return Gt(Us(t))}function M0(t){const e=document.activeElement;if(!In(e))return!1;const n=e.nodeName;return Gt(Us(t))&&(n==="INPUT"||n==="TEXTAREA"||e.contentEditable==="true"&&sv(e)==null)}function Gh(t,e,n){const r=t.getRootElement();try{return r!==null&&r.contains(e)&&r.contains(n)&&e!==null&&!M0(e)&&av(e)===t}catch{return!1}}function D0(t){return t instanceof Du}function av(t){let e=t;for(;e!=null;){const n=sv(e);if(D0(n))return n;e=Wh(e)}return null}function sv(t){return t?t.__lexicalEditor:null}function rV(t){return oK.test(t)?"rtl":aK.test(t)?"ltr":null}function Al(t){return hi(t)||t.isToken()}function Ra(t){return Al(t)||t.isSegmented()}function us(t){return kd(t)&&t.nodeType===3}function mI(t){return kd(t)&&t.nodeType===9}function Fu(t){let e=t;for(;e!=null;){if(us(e))return e;e=e.firstChild}return null}function Kg(t,e,n){const r=Yl[e];if(n!==null&&(t&r)===(n&r))return t;let i=t^r;return e==="subscript"?i&=-65:e==="superscript"?i&=-33:e==="lowercase"?(i&=-513,i&=-1025):e==="uppercase"?(i&=-257,i&=-1025):e==="capitalize"&&(i&=-257,i&=-513),i}function iV(t){return Ye(t)||Bn(t)||Gt(t)}function oV(t,e){const n=(function(){const a=By;return By=null,a})();if((e=e||n&&n.__key)!=null)return void(t.__key=e);Tr(),lI();const r=Vn(),i=tl(),o=""+tV++;i._nodeMap.set(o,t),we(t)?r._dirtyElements.set(o,!0):r._dirtyLeaves.add(o),r._cloneNotNeeded.add(o),r._dirtyType=1,t.__key=o}function Cl(t){const e=t.getParent();if(e!==null){const n=t.getWritable(),r=e.getWritable(),i=t.getPreviousSibling(),o=t.getNextSibling(),a=o!==null?o.__key:null,s=i!==null?i.__key:null,l=i!==null?i.getWritable():null,u=o!==null?o.getWritable():null;i===null&&(r.__first=a),o===null&&(r.__last=s),l!==null&&(l.__next=a),u!==null&&(u.__prev=s),n.__prev=null,n.__next=null,n.__parent=null,r.__size--}}function Vg(t){lI(),Bg(t)&&Be(323,t.__key,t.__type);const e=t.getLatest(),n=e.__parent,r=tl(),i=Vn(),o=r._nodeMap,a=i._dirtyElements;n!==null&&(function(l,u,d){let f=l;for(;f!==null;){if(d.has(f))return;const h=u.get(f);if(h===void 0)break;d.set(f,!1),f=h.__parent}})(n,o,a);const s=e.__key;i._dirtyType=1,we(t)?a.set(s,!0):i._dirtyLeaves.add(s)}function Ir(t){Tr();const e=Vn(),n=e._compositionKey;if(t!==n){if(e._compositionKey=t,n!==null){const r=qn(n);r!==null&&r.getWritable()}if(t!==null){const r=qn(t);r!==null&&r.getWritable()}}}function ks(){return Hh()?null:Vn()._compositionKey}function qn(t,e){const n=(e||tl())._nodeMap.get(t);return n===void 0?null:n}function vI(t,e){const n=lv(t,Vn());return n!==void 0?qn(n,e):null}function lv(t,e){return t[`__lexicalKey_${e._key}`]}function Us(t,e){let n=t;for(;n!=null;){const r=vI(n,e);if(r!==null)return r;n=Wh(n)}return null}function _I(t){const e=t._decorators,n=Object.assign({},e);return t._pendingDecorators=n,n}function VE(t){return t.read(()=>ar().getTextContent())}function ar(){return bI(tl())}function bI(t){return t._nodeMap.get("root")}function Br(t){Tr();const e=tl();t!==null&&(t.dirty=!0,t.setCachedNodes(null)),e._selection=t}function Qc(t){const e=Vn(),n=(function(r,i){let o=r;for(;o!=null;){const a=lv(o,i);if(a!==void 0)return a;o=Wh(o)}return null})(t,e);return n===null?t===e.getRootElement()?qn("root"):null:qn(n)}function yI(t){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(t)}function F0(t){const e=[];let n=t;for(;n!==null;)e.push(n),n=n._parentEditor;return e}function wI(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function xI(t){return us(t)?t.nodeValue:null}function z0(t,e,n){const r=Bo(bo(e));if(r===null)return;const i=r.anchorNode;let{anchorOffset:o,focusOffset:a}=r;if(i!==null){let s=xI(i);const l=Us(i);if(s!==null&&Ye(l)){if(s===ev&&n){const u=n.length;s=n,o=u,a=u}s!==null&&j0(l,s,o,a,t)}}}function j0(t,e,n,r,i){let o=t;if(o.isAttached()&&(i||!o.isDirty())){const a=o.isComposing();let s=e;(a||i)&&e[e.length-1]===ev&&(s=e.slice(0,-1));const l=o.getTextContent();if(i||s!==l){if(s===""){if(Ir(null),th||Nu||nh)o.remove();else{const m=Vn();setTimeout(()=>{m.update(()=>{o.isAttached()&&o.remove()})},20)}return}const u=o.getParent(),d=wc(),f=o.getTextContentSize(),h=ks(),p=o.getKey();if(o.isToken()||h!==null&&p===h&&!a||De(d)&&(u!==null&&!u.canInsertTextBefore()&&d.anchor.offset===0||d.anchor.key===t.__key&&d.anchor.offset===0&&!o.canInsertTextBefore()&&!a||d.focus.key===t.__key&&d.focus.offset===f&&!o.canInsertTextAfter()&&!a))return void o.markDirty();const g=Ge();if(!De(g)||n===null||r===null)return void GE(o,s,g);if(g.setTextNodeRange(o,n,o,r),o.isSegmented()){const m=zn(o.getTextContent());o.replace(m),o=m}GE(o,s,g)}}}function GE(t,e,n){if(t.setTextContent(e),De(n)){const r=t.getKey();for(const i of["anchor","focus"]){const o=n[i];o.type==="text"&&o.key===r&&(o.offset=Is(t,o.offset,"clamp"))}}}function Pp(t,e,n){const r=e[n]||!1;return r==="any"||r===t[n]}function aV(t,e){return Pp(t,e,"altKey")&&Pp(t,e,"ctrlKey")&&Pp(t,e,"shiftKey")&&Pp(t,e,"metaKey")}function an(t,e,n){return aV(t,n)&&t.key.toLowerCase()===e.toLowerCase()}const Ia={ctrlKey:!$o,metaKey:$o},WE={altKey:$o,ctrlKey:!$o};function YE(t){return t.key==="Backspace"}function JE(t){return an(t,"a",Ia)}function sV(t){const e=ar();if(De(t)){const n=t.anchor,r=t.focus,i=n.getNode().getTopLevelElementOrThrow().getParentOrThrow();return n.set(i.getKey(),0,"element"),r.set(i.getKey(),i.getChildrenSize(),"element"),Ru(t),t}{const n=e.select(0,e.getChildrenSize());return Br(Ru(n)),n}}function su(t,e){t.__lexicalClassNameCache===void 0&&(t.__lexicalClassNameCache={});const n=t.__lexicalClassNameCache,r=n[e];if(r!==void 0)return r;const i=t[e];if(typeof i=="string"){const o=_L(i);return n[e]=o,o}return i}function U0(t,e,n,r,i){if(n.size===0)return;const o=r.__type,a=r.__key,s=e.get(o);s===void 0&&Be(33,o);const l=s.klass;let u=t.get(l);u===void 0&&(u=new Map,t.set(l,u));const d=u.get(a),f=d==="destroyed"&&i==="created";(d===void 0||f)&&u.set(a,f?"updated":i)}function XE(t,e,n){const r=t.getParent();let i=n,o=t;return r!==null&&(e&&n===0?(i=o.getIndexWithinParent(),o=r):e||n!==o.getChildrenSize()||(i=o.getIndexWithinParent()+1,o=r)),o.getChildAtIndex(e?i-1:i)}function qy(t,e){const n=t.offset;if(t.type==="element")return XE(t.getNode(),e,n);{const r=t.getNode();if(e&&n===0||!e&&n===r.getTextContentSize()){const i=e?r.getPreviousSibling():r.getNextSibling();return i===null?XE(r.getParentOrThrow(),e,r.getIndexWithinParent()+(e?0:1)):i}}return null}function kI(t){const e=bo(t).event,n=e&&e.inputType;return n==="insertFromPaste"||n==="insertFromPasteAsQuotation"}function tt(t,e,n){return(function(r,i,o){const a=F0(r);for(let s=4;s>=0;s--)for(let l=0;l<a.length;l++){const u=a[l],d=u._commands.get(i);if(d!==void 0){const f=d[s];if(f!==void 0){const h=Array.from(f),p=h.length;let g=!1;if(Ui(u,()=>{for(let m=0;m<p;m++)if(h[m](o,r))return void(g=!0)}),g)return g}}}return!1})(t,e,n)}function cv(t){return!ur(t)&&!t.isLastChild()&&!t.isInline()}function Zl(t,e){const n=t._keyToDOMMap.get(e);return n===void 0&&Be(75,e),n}function Wh(t){const e=t.assignedSlot||t.parentElement;return Vy(e)?e.host:e}function SI(t){return mI(t)?t:In(t)?t.ownerDocument:null}function lV(t){Tr(),Vn()._updateTags.add(t)}function cV(t){Tr(),Vn()._deferred.push(t)}function Hy(t,e){let n=t.getParent();for(;n!==null;){if(n.is(e))return!0;n=n.getParent()}return!1}function B0(t){const e=SI(t);return e?e.defaultView:null}function bo(t){const e=t._window;return e===null&&Be(78),e}function uV(t){return we(t)&&t.isInline()||Gt(t)&&t.isInline()}function dV(t){let e=t.getParentOrThrow();for(;e!==null;){if(Yi(e))return e;e=e.getParentOrThrow()}return e}function Yi(t){return ur(t)||we(t)&&t.isShadowRoot()}function Di(t){const e=Vn(),n=t.getType(),r=R0(e,n);r===void 0&&Be(200,t.constructor.name,n);const{replace:i,replaceWithKlass:o}=r;if(i!==null){const a=i(t),s=a.constructor;return o!==null?a instanceof o||Be(201,o.name,o.getType(),s.name,s.getType(),t.constructor.name,n):a instanceof t.constructor&&s!==t.constructor||Be(202,s.name,s.getType(),t.constructor.name,n),a.__key===t.__key&&Be(203,t.constructor.name,n,s.name,s.getType()),a}return t}function $_(t,e){!ur(t.getParent())||we(e)||Gt(e)||Be(99)}function fV(t){const e=qn(t);return e===null&&Be(63,t),e}function A_(t){return(Gt(t)||we(t)&&!t.canBeEmpty())&&!t.isInline()}function Ky(t,e,n){n.style.removeProperty("caret-color"),e._blockCursorElement=null;const r=t.parentElement;r!==null&&r.removeChild(t)}function Bo(t){return Wo?(t||window).getSelection():null}function hV(t){const e=B0(t);return e?e.getSelection():null}function EI(t){return In(t)&&t.tagName==="A"}function In(t){return kd(t)&&t.nodeType===1}function kd(t){return typeof t=="object"&&t!==null&&"nodeType"in t&&typeof t.nodeType=="number"}function Vy(t){return kd(t)&&t.nodeType===11}function Gy(t){const e=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return t.nodeName.match(e)!==null}function Gg(t){const e=new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,"i");return t.nodeName.match(e)!==null}function fo(t){if(Gt(t)&&!t.isInline())return!0;if(!we(t)||Yi(t))return!1;const e=t.getFirstChild(),n=e===null||Bn(e)||Ye(e)||e.isInline();return!t.isInline()&&t.canBeEmpty()!==!1&&n}function Yh(){return Vn()}const ZE=new WeakMap,pV=new Map;function QE(t){if(!t._readOnly&&t.isEmpty())return pV;t._readOnly||Be(192);let e=ZE.get(t);return e||(e=(function(n){const r=new Map;for(const[i,o]of n._nodeMap){const a=o.__type;let s=r.get(a);s||(s=new Map,r.set(a,s)),s.set(i,o)}return r})(t),ZE.set(t,e)),e}function TI(t){const e=t.constructor.clone(t);return e.afterCloneFrom(t),e}function gV(t){return(e=TI(t))[eI]=!0,e;var e}function q0(t,e){const n=parseInt(t.style.paddingInlineStart,10)||0,r=Math.round(n/40);e.setIndent(r)}function mV(t){t.__lexicalUnmanaged=!0}function vV(t){return t.__lexicalUnmanaged===!0}function qd(t,e){return(function(n,r){return Object.prototype.hasOwnProperty.call(n,r)})(t,e)&&t[e]!==ha[e]}function uv(t){const e=fE in t.prototype?t.prototype[fE]():void 0,n=(function(a){if(!(a===ha||a.prototype instanceof ha)){let s="<unknown>",l="<unknown>";try{s=a.getType()}catch{}try{Du.version&&(l=JSON.parse(Du.version))}catch{}Be(290,a.name,s,l)}return a===O0||a===ir||a===ha})(t),r=!n&&qd(t,"getType")?t.getType():void 0;let i,o=r;if(e)if(r)i=e[r];else for(const[a,s]of Object.entries(e))o=a,i=s;if(!n&&o&&(qd(t,"getType")||(t.getType=()=>o),qd(t,"clone")||(t.clone=a=>(N0(a),new t)),qd(t,"importJSON")||(t.importJSON=i&&i.$importJSON||(a=>new t().updateFromJSON(a))),!qd(t,"importDOM")&&i)){const{importDOM:a}=i;a&&(t.importDOM=()=>a)}return{ownNodeConfig:i,ownNodeType:o}}function _V(t){const e=Yh();return Tr(),new(e.resolveRegisteredNodeAfterReplacements(e.getRegisteredNode(t))).klass}const pi=(t,e)=>{let n=t;for(;n!=null&&!ur(n);){if(e(n))return n;n=n.getParent()}return null},bV={next:"previous",previous:"next"};class H0{origin;constructor(e){this.origin=e}[Symbol.iterator](){return Y0({hasNext:tc,initial:this.getAdjacentCaret(),map:e=>e,step:e=>e.getAdjacentCaret()})}getAdjacentCaret(){return Cr(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return Cr(this.origin,this.direction)}remove(){const e=this.getNodeAtCaret();return e&&e.remove(),this}replaceOrInsert(e,n){const r=this.getNodeAtCaret();return e.is(this.origin)||e.is(r)||(r===null?this.insert(e):r.replace(e,n)),this}splice(e,n,r="next"){const i=r===this.direction?n:Array.from(n).reverse();let o=this;const a=this.getParentAtCaret(),s=new Map;for(let l=o.getAdjacentCaret();l!==null&&s.size<e;l=l.getAdjacentCaret()){const u=l.origin.getWritable();s.set(u.getKey(),u)}for(const l of i){if(s.size>0){const u=o.getNodeAtCaret();if(u){if(s.delete(u.getKey()),s.delete(l.getKey()),!(u.is(l)||o.origin.is(l))){const d=l.getParent();d&&d.is(a)&&l.remove(),u.replace(l)}}else u===null&&Be(263,Array.from(s).join(" "))}else o.insert(l);o=Cr(l,this.direction)}for(const l of s.values())l.remove();return this}}class lh extends H0{type="child";getLatest(){const e=this.origin.getLatest();return e===this.origin?this:ya(e,this.direction)}getParentCaret(e="root"){return Cr(K0(this.getParentAtCaret(),e),this.direction)}getFlipped(){const e=Sd(this.direction);return Cr(this.getNodeAtCaret(),e)||ya(this.origin,e)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(e){return e instanceof lh&&this.direction===e.direction&&this.origin.is(e.origin)}isSamePointCaret(e){return this.isSameNodeCaret(e)}}const yV={root:ur,shadowRoot:Yi};function Sd(t){return bV[t]}function K0(t,e="root"){return yV[e](t)?null:t}class Ql extends H0{type="sibling";getLatest(){const e=this.origin.getLatest();return e===this.origin?this:Cr(e,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return we(this.origin)?ya(this.origin,this.direction):null}getParentCaret(e="root"){return Cr(K0(this.getParentAtCaret(),e),this.direction)}getFlipped(){const e=Sd(this.direction);return Cr(this.getNodeAtCaret(),e)||ya(this.origin.getParentOrThrow(),e)}isSamePointCaret(e){return e instanceof Ql&&this.direction===e.direction&&this.origin.is(e.origin)}isSameNodeCaret(e){return(e instanceof Ql||e instanceof ec)&&this.direction===e.direction&&this.origin.is(e.origin)}}class ec extends H0{type="text";offset;constructor(e,n){super(e),this.offset=n}getLatest(){const e=this.origin.getLatest();return e===this.origin?this:Bs(e,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(e="root"){return Cr(K0(this.getParentAtCaret(),e),this.direction)}getFlipped(){return Bs(this.origin,Sd(this.direction),this.offset)}isSamePointCaret(e){return e instanceof ec&&this.direction===e.direction&&this.origin.is(e.origin)&&this.offset===e.offset}isSameNodeCaret(e){return(e instanceof Ql||e instanceof ec)&&this.direction===e.direction&&this.origin.is(e.origin)}getSiblingCaret(){return Cr(this.origin,this.direction)}}function Ls(t){return t instanceof ec}function tc(t){return t instanceof Ql}function pa(t){return t instanceof lh}const wV={next:class extends ec{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(t){return this.origin.insertAfter(t),this}},previous:class extends ec{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(t){return this.origin.insertBefore(t),this}}},xV={next:class extends Ql{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(t){return this.origin.insertAfter(t),this}},previous:class extends Ql{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(t){return this.origin.insertBefore(t),this}}},kV={next:class extends lh{direction="next";getNodeAtCaret(){return this.origin.getFirstChild()}insert(t){return this.origin.splice(0,0,[t]),this}},previous:class extends lh{direction="previous";getNodeAtCaret(){return this.origin.getLastChild()}insert(t){return this.origin.splice(this.origin.getChildrenSize(),0,[t]),this}}};function Cr(t,e){return t?new xV[e](t):null}function Bs(t,e,n){return t?new wV[e](t,Is(t,n)):null}function Is(t,e,n="error"){const r=t.getTextContentSize();let i=e==="next"?r:e==="previous"?0:e;return(i<0||i>r)&&(n!=="clamp"&&mL(284,String(e),String(r),t.getKey()),i=i<0?0:r),i}function eT(t,e){return new EV(t,e)}function ya(t,e){return we(t)?new kV[e](t):null}function SV(t){return t&&t.getChildCaret()||t}function V0(t){return t&&SV(t.getAdjacentCaret())}class G0{type="node-caret-range";direction;anchor;focus;constructor(e,n,r){this.anchor=e,this.focus=n,this.direction=r}getLatest(){const e=this.anchor.getLatest(),n=this.focus.getLatest();return e===this.anchor&&n===this.focus?this:new G0(e,n,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const e=i=>{const o=this[i].getLatest();return Ls(o)?(function(a,s){const{direction:l,origin:u}=a,d=Is(u,s==="focus"?Sd(l):l);return eT(a,d-a.offset)})(o,i):null},n=e("anchor"),r=e("focus");if(n&&r){const{caret:i}=n,{caret:o}=r;if(i.isSameNodeCaret(o))return[eT(i,o.offset-i.offset),null]}return[n,r]}iterNodeCarets(e="root"){const n=Ls(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),r=this.focus.getLatest(),i=Ls(r),o=a=>a.isSameNodeCaret(r)?null:V0(a)||a.getParentCaret(e);return Y0({hasNext:a=>a!==null&&!(i&&r.isSameNodeCaret(a)),initial:n.isSameNodeCaret(r)?null:o(n),map:a=>a,step:o})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class EV{type="slice";caret;distance;constructor(e,n){this.caret=e,this.distance=n}getSliceIndices(){const{distance:e,caret:{offset:n}}=this,r=n+e;return r<n?[r,n]:[n,r]}getTextContent(){const[e,n]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(e,n)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){const{caret:{origin:e,direction:n}}=this,[r,i]=this.getSliceIndices(),o=e.getTextContent();return Bs(e.setTextContent(o.slice(0,r)+o.slice(i)),n,r)}}function W0(t){return Qa(t,Cr(ar(),t.direction))}function TV(t){return Qa(t,t)}function Qa(t,e){return t.direction!==e.direction&&Be(265),new G0(t,e,t.direction)}function Y0(t){const{initial:e,hasNext:n,step:r,map:i}=t;let o=e;return{[Symbol.iterator](){return this},next(){if(!n(o))return{done:!0,value:void 0};const a={done:!1,value:i(o)};return o=r(o),a}}}function $I(t,e){const n=rg(t.origin,e.origin);switch(n===null&&Be(275,t.origin.getKey(),e.origin.getKey()),n.type){case"same":{const r=t.type==="text",i=e.type==="text";return r&&i?(function(o,a){return Math.sign(o-a)})(t.offset,e.offset):t.type===e.type?0:r?-1:i?1:t.type==="child"?-1:1}case"ancestor":return t.type==="child"?-1:1;case"descendant":return e.type==="child"?1:-1;case"branch":return AI(n)}}function AI(t){const{a:e,b:n}=t,r=e.__key,i=n.__key;let o=e,a=n;for(;o&&a;o=o.getNextSibling(),a=a.getNextSibling()){if(o.__key===i)return-1;if(a.__key===r)return 1}return o===null?1:-1}function Op(t,e){return e.is(t)}function tT(t){return we(t)?[t.getLatest(),null]:[t.getParent(),t.getLatest()]}function rg(t,e){if(t.is(e))return{commonAncestor:t,type:"same"};const n=new Map;for(let[r,i]=tT(t);r;i=r,r=r.getParent())n.set(r,i);for(let[r,i]=tT(e);r;i=r,r=r.getParent()){const o=n.get(r);if(o!==void 0)return o===null?(Op(t,r)||Be(276),{commonAncestor:r,type:"ancestor"}):i===null?(Op(e,r)||Be(277),{commonAncestor:r,type:"descendant"}):((we(o)||Op(t,o))&&(we(i)||Op(e,i))&&r.is(o.getParent())&&r.is(i.getParent())||Be(278),{a:o,b:i,commonAncestor:r,type:"branch"})}return null}function es(t,e){const{type:n,key:r,offset:i}=t,o=fV(t.key);return n==="text"?(Ye(o)||Be(266,o.getType(),r),Bs(o,e,i)):(we(o)||Be(267,o.getType(),r),AV(o,t.offset,e))}function ch(t,e){const{origin:n,direction:r}=e,i=r==="next";Ls(e)?t.set(n.getKey(),e.offset,"text"):tc(e)?Ye(n)?t.set(n.getKey(),Is(n,r),"text"):t.set(n.getParentOrThrow().getKey(),n.getIndexWithinParent()+(i?1:0),"element"):(pa(e)&&we(n)||Be(268),t.set(n.getKey(),i?0:n.getChildrenSize(),"element"))}function CI(t){const e=Ge(),n=De(e)?e:iv();return ig(n,t),Br(n),n}function ig(t,e){ch(t.anchor,e.anchor),ch(t.focus,e.focus)}function nT(t){const{anchor:e,focus:n}=t,r=es(e,"next"),i=es(n,"next"),o=$I(r,i)<=0?"next":"previous";return Qa(zu(r,o),zu(i,o))}function J0(t){const{direction:e,origin:n}=t,r=Cr(n,Sd(e)).getNodeAtCaret();return r?Cr(r,e):ya(n.getParentOrThrow(),e)}function rT(t,e="root"){const n=[t];for(let r=pa(t)?t.getParentCaret(e):t.getSiblingCaret();r!==null;r=r.getParentCaret(e))n.push(J0(r));return n}function C_(t){return!!t&&t.origin.isAttached()}function $V(t,e="removeEmptySlices"){if(t.isCollapsed())return t;const n="root",r="next";let i=e;const o=X0(t,r),a=rT(o.anchor,n),s=rT(o.focus.getFlipped(),n),l=new Set,u=[];for(const g of o.iterNodeCarets(n))if(pa(g))l.add(g.origin.getKey());else if(tc(g)){const{origin:m}=g;we(m)&&!l.has(m.getKey())||u.push(m)}for(const g of u)g.remove();for(const g of o.getTextSlices()){if(!g)continue;const{origin:m}=g.caret,v=m.getTextContentSize(),b=J0(Cr(m,r)),y=m.getMode();if(Math.abs(g.distance)===v&&i==="removeEmptySlices"||y==="token"&&g.distance!==0)b.remove();else if(g.distance!==0){i="removeEmptySlices";let w=g.removeTextSlice();const x=g.caret.origin;if(y==="segmented"){const E=w.origin,$=zn(E.getTextContent()).setStyle(E.getStyle()).setFormat(E.getFormat());b.replaceOrInsert($),w=Bs($,r,w.offset)}x.is(a[0].origin)&&(a[0]=w),x.is(s[0].origin)&&(s[0]=w.getFlipped())}}let d,f;for(const g of a)if(C_(g)){d=Lo(g);break}for(const g of s)if(C_(g)){f=Lo(g);break}const h=(function(g,m,v){if(!g||!m)return null;const b=g.getParentAtCaret(),y=m.getParentAtCaret();if(!b||!y)return null;const w=b.getParents().reverse();w.push(b);const x=y.getParents().reverse();x.push(y);const E=Math.min(w.length,x.length);let $;for($=0;$<E&&w[$]===x[$];$++);const A=(C,P)=>{let O;for(let I=$;I<C.length;I++){const L=C[I];if(Yi(L))return;!O&&P(L)&&(O=L)}return O},k=A(w,fo),T=k&&A(x,C=>v.has(C.getKey())&&fo(C));return k&&T?[k,T]:null})(d,f,l);if(h){const[g,m]=h;ya(g,"previous").splice(0,m.getChildren()),m.remove()}const p=[d,f,...a,...s].find(C_);if(p)return TV(zu(Lo(p),t.direction));Be(269,JSON.stringify(a.map(g=>g.origin.__key)))}function Lo(t){const e=(function(i){let o=i;for(;pa(o);){const a=V0(o);if(!pa(a))break;o=a}return o})(t.getLatest()),{direction:n}=e;if(Ye(e.origin))return Ls(e)?e:Bs(e.origin,n,n);const r=e.getAdjacentCaret();return tc(r)&&Ye(r.origin)?Bs(r.origin,n,Sd(n)):e}function PI(t){return Ls(t)&&t.offset!==Is(t.origin,t.direction)}function zu(t,e){return t.direction===e?t:t.getFlipped()}function X0(t,e){return t.direction===e?t:Qa(zu(t.focus,e),zu(t.anchor,e))}function AV(t,e,n){let r=ya(t,"next");for(let i=0;i<e;i++){const o=r.getAdjacentCaret();if(o===null)break;r=o}return zu(r,n)}function CV(...t){return t}function PV(t,e){if(!e||t===e)return t;for(const n in e)if(t[n]!==e[n])return{...t,...e};return t}const Wy=new Map;function OI(t){const e={};if(!t)return e;const n=t.split(";");for(const r of n)if(r!==""){const[i,o]=r.split(/:([^]+)/);i&&o&&(e[i.trim()]=o.trim())}return e}function iT(t){let e=Wy.get(t);return e===void 0&&(e=OI(t),Wy.set(t,e)),e}function LI(t){const e=Yh().getElementByKey(t.getKey());if(e===null)return null;const n=e.ownerDocument.defaultView;return n===null?null:n.getComputedStyle(e)}function II(t){return LI(ur(t)?t:t.getParentOrThrow())}function oT(t){const e=II(t);return e!==null&&e.direction==="rtl"}function NI(t,e,n="self"){const r=t.getStartEndPoints();if(e.isSelected(t)&&!Ra(e)&&r!==null){const[i,o]=r,a=t.isBackward(),s=i.getNode(),l=o.getNode(),u=e.is(s),d=e.is(l);if(u||d){const[f,h]=jy(t),p=s.is(l),g=e.is(a?l:s),m=e.is(a?s:l);let v,b=0;p?(b=f>h?h:f,v=f>h?f:h):g?(b=a?h:f,v=void 0):m&&(b=0,v=a?f:h);const y=e.__text.slice(b,v);y!==e.__text&&(n==="clone"&&(e=gV(e)),e.__text=y)}}return e}function OV(t){const e=t.getStyle(),n=OI(e);Wy.set(e,n)}function LV(t,e){const n=t.getFormatType(),r=t.getIndent();n!==e.getFormatType()&&e.setFormat(n),r!==e.getIndent()&&e.setIndent(r)}function Lp(t,e,n=LV){if(t===null)return;const r=t.getStartEndPoints(),i=new Map;let o=null;if(r){const[a,s]=r;o=iv(),o.anchor.set(a.key,a.offset,a.type),o.focus.set(s.key,s.offset,s.type);const l=pi(a.getNode(),fo),u=pi(s.getNode(),fo);we(l)&&i.set(l.getKey(),l),we(u)&&i.set(u.getKey(),u)}for(const a of t.getNodes())if(we(a)&&fo(a))i.set(a.getKey(),a);else if(r===null){const s=pi(a,fo);we(s)&&i.set(s.getKey(),s)}for(const[a,s]of i){const l=e();n(s,l),s.replace(l,!0),o&&(a===o.anchor.key&&o.anchor.set(l.getKey(),o.anchor.offset,o.anchor.type),a===o.focus.key&&o.focus.set(l.getKey(),o.focus.offset,o.focus.type))}o&&t.is(Ge())&&Br(o)}function RI(t){const e=MI(t);return e!==null&&e.writingMode==="vertical-rl"}function MI(t){const e=t.anchor.getNode();return we(e)?LI(e):II(e)}function aT(t,e){let n=RI(t)?!e:e;DI(t)&&(n=!n);const r=es(t.focus,n?"previous":"next");if(PI(r))return!1;for(const i of W0(r)){if(pa(i))return!i.origin.isInline();if(!we(i.origin)){if(Gt(i.origin))return!0;break}}return!1}function IV(t,e,n,r){t.modify(e?"extend":"move",n,r)}function DI(t){const e=MI(t);return e!==null&&e.direction==="rtl"}function sT(t,e,n){const r=DI(t);let i;i=RI(t)||r?!n:n,IV(t,e,i,"character")}function NV(t,...e){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",t);for(const i of e)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const FI=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,RV=FI&&"documentMode"in document?document.documentMode:null;!(!FI||!("InputEvent"in window)||RV)&&"getTargetRanges"in new window.InputEvent("input");function zI(...t){const e=[];for(const n of t)if(n&&typeof n=="string")for(const[r]of n.matchAll(/\S+/g))e.push(r);return e}function uh(...t){return()=>{for(let e=t.length-1;e>=0;e--)t[e]();t.length=0}}function Rr(t,...e){const n=zI(...e);n.length>0&&t.classList.add(...n)}function Pl(t,...e){const n=zI(...e);n.length>0&&t.classList.remove(...n)}function MV(t){return t?t.getAdjacentCaret():null}function Pf(t,e){let n=t;for(;n!=null;){if(n instanceof e)return n;n=n.getParent()}return null}function DV(t){const e=pi(t,n=>we(n)&&!n.isInline());return we(e)||NV(4,t.__key),e}function bl(t,e){return t!==null&&Object.getPrototypeOf(t).constructor.name===e.name}function jI(t,e){const n=[],r=Array.from(t).reverse();for(let i=r.pop();i!==void 0;i=r.pop())if(e(i))n.push(i);else if(we(i))for(const o of FV(i))r.push(o);return n}function FV(t){return zV(ya(t,"previous"))}function zV(t){return Y0({hasNext:tc,initial:t.getAdjacentCaret(),map:e=>e.origin.getLatest(),step:e=>e.getAdjacentCaret()})}var P_={exports:{}},lT;function jV(){return lT||(lT=1,(function(t){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};var n=(function(r){var i=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,o=0,a={},s={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function y(w){return w instanceof l?new l(w.type,y(w.content),w.alias):Array.isArray(w)?w.map(y):w.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(y){return Object.prototype.toString.call(y).slice(8,-1)},objId:function(y){return y.__id||Object.defineProperty(y,"__id",{value:++o}),y.__id},clone:function y(w,x){x=x||{};var E,$;switch(s.util.type(w)){case"Object":if($=s.util.objId(w),x[$])return x[$];E={},x[$]=E;for(var A in w)w.hasOwnProperty(A)&&(E[A]=y(w[A],x));return E;case"Array":return $=s.util.objId(w),x[$]?x[$]:(E=[],x[$]=E,w.forEach(function(k,T){E[T]=y(k,x)}),E);default:return w}},getLanguage:function(y){for(;y;){var w=i.exec(y.className);if(w)return w[1].toLowerCase();y=y.parentElement}return"none"},setLanguage:function(y,w){y.className=y.className.replace(RegExp(i,"gi"),""),y.classList.add("language-"+w)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(E){var y=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(E.stack)||[])[1];if(y){var w=document.getElementsByTagName("script");for(var x in w)if(w[x].src==y)return w[x]}return null}},isActive:function(y,w,x){for(var E="no-"+w;y;){var $=y.classList;if($.contains(w))return!0;if($.contains(E))return!1;y=y.parentElement}return!!x}},languages:{plain:a,plaintext:a,text:a,txt:a,extend:function(y,w){var x=s.util.clone(s.languages[y]);for(var E in w)x[E]=w[E];return x},insertBefore:function(y,w,x,E){E=E||s.languages;var $=E[y],A={};for(var k in $)if($.hasOwnProperty(k)){if(k==w)for(var T in x)x.hasOwnProperty(T)&&(A[T]=x[T]);x.hasOwnProperty(k)||(A[k]=$[k])}var C=E[y];return E[y]=A,s.languages.DFS(s.languages,function(P,O){O===C&&P!=y&&(this[P]=A)}),A},DFS:function y(w,x,E,$){$=$||{};var A=s.util.objId;for(var k in w)if(w.hasOwnProperty(k)){x.call(w,k,w[k],E||k);var T=w[k],C=s.util.type(T);C==="Object"&&!$[A(T)]?($[A(T)]=!0,y(T,x,null,$)):C==="Array"&&!$[A(T)]&&($[A(T)]=!0,y(T,x,k,$))}}},plugins:{},highlightAll:function(y,w){s.highlightAllUnder(document,y,w)},highlightAllUnder:function(y,w,x){var E={callback:x,container:y,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};s.hooks.run("before-highlightall",E),E.elements=Array.prototype.slice.apply(E.container.querySelectorAll(E.selector)),s.hooks.run("before-all-elements-highlight",E);for(var $=0,A;A=E.elements[$++];)s.highlightElement(A,w===!0,E.callback)},highlightElement:function(y,w,x){var E=s.util.getLanguage(y),$=s.languages[E];s.util.setLanguage(y,E);var A=y.parentElement;A&&A.nodeName.toLowerCase()==="pre"&&s.util.setLanguage(A,E);var k=y.textContent,T={element:y,language:E,grammar:$,code:k};function C(O){T.highlightedCode=O,s.hooks.run("before-insert",T),T.element.innerHTML=T.highlightedCode,s.hooks.run("after-highlight",T),s.hooks.run("complete",T),x&&x.call(T.element)}if(s.hooks.run("before-sanity-check",T),A=T.element.parentElement,A&&A.nodeName.toLowerCase()==="pre"&&!A.hasAttribute("tabindex")&&A.setAttribute("tabindex","0"),!T.code){s.hooks.run("complete",T),x&&x.call(T.element);return}if(s.hooks.run("before-highlight",T),!T.grammar){C(s.util.encode(T.code));return}if(w&&r.Worker){var P=new Worker(s.filename);P.onmessage=function(O){C(O.data)},P.postMessage(JSON.stringify({language:T.language,code:T.code,immediateClose:!0}))}else C(s.highlight(T.code,T.grammar,T.language))},highlight:function(y,w,x){var E={code:y,grammar:w,language:x};if(s.hooks.run("before-tokenize",E),!E.grammar)throw new Error('The language "'+E.language+'" has no grammar.');return E.tokens=s.tokenize(E.code,E.grammar),s.hooks.run("after-tokenize",E),l.stringify(s.util.encode(E.tokens),E.language)},tokenize:function(y,w){var x=w.rest;if(x){for(var E in x)w[E]=x[E];delete w.rest}var $=new f;return h($,$.head,y),d(y,$,w,$.head,0),g($)},hooks:{all:{},add:function(y,w){var x=s.hooks.all;x[y]=x[y]||[],x[y].push(w)},run:function(y,w){var x=s.hooks.all[y];if(!(!x||!x.length))for(var E=0,$;$=x[E++];)$(w)}},Token:l};r.Prism=s;function l(y,w,x,E){this.type=y,this.content=w,this.alias=x,this.length=(E||"").length|0}l.stringify=function y(w,x){if(typeof w=="string")return w;if(Array.isArray(w)){var E="";return w.forEach(function(C){E+=y(C,x)}),E}var $={type:w.type,content:y(w.content,x),tag:"span",classes:["token",w.type],attributes:{},language:x},A=w.alias;A&&(Array.isArray(A)?Array.prototype.push.apply($.classes,A):$.classes.push(A)),s.hooks.run("wrap",$);var k="";for(var T in $.attributes)k+=" "+T+'="'+($.attributes[T]||"").replace(/"/g,""")+'"';return"<"+$.tag+' class="'+$.classes.join(" ")+'"'+k+">"+$.content+"</"+$.tag+">"};function u(y,w,x,E){y.lastIndex=w;var $=y.exec(x);if($&&E&&$[1]){var A=$[1].length;$.index+=A,$[0]=$[0].slice(A)}return $}function d(y,w,x,E,$,A){for(var k in x)if(!(!x.hasOwnProperty(k)||!x[k])){var T=x[k];T=Array.isArray(T)?T:[T];for(var C=0;C<T.length;++C){if(A&&A.cause==k+","+C)return;var P=T[C],O=P.inside,I=!!P.lookbehind,L=!!P.greedy,D=P.alias;if(L&&!P.pattern.global){var B=P.pattern.toString().match(/[imsuy]*$/)[0];P.pattern=RegExp(P.pattern.source,B+"g")}for(var K=P.pattern||P,G=E.next,W=$;G!==w.tail&&!(A&&W>=A.reach);W+=G.value.length,G=G.next){var Y=G.value;if(w.length>y.length)return;if(!(Y instanceof l)){var R=1,q;if(L){if(q=u(K,W,y,I),!q||q.index>=y.length)break;var re=q.index,J=q.index+q[0].length,Q=W;for(Q+=G.value.length;re>=Q;)G=G.next,Q+=G.value.length;if(Q-=G.value.length,W=Q,G.value instanceof l)continue;for(var ee=G;ee!==w.tail&&(Q<J||typeof ee.value=="string");ee=ee.next)R++,Q+=ee.value.length;R--,Y=y.slice(W,Q),q.index-=W}else if(q=u(K,0,Y,I),!q)continue;var re=q.index,te=q[0],de=Y.slice(0,re),he=Y.slice(re+te.length),ue=W+Y.length;A&&ue>A.reach&&(A.reach=ue);var ge=G.prev;de&&(ge=h(w,ge,de),W+=de.length),p(w,ge,R);var ye=new l(k,O?s.tokenize(te,O):te,D,te);if(G=h(w,ge,ye),he&&h(w,G,he),R>1){var me={cause:k+","+C,reach:ue};d(y,w,x,G.prev,W,me),A&&me.reach>A.reach&&(A.reach=me.reach)}}}}}}function f(){var y={value:null,prev:null,next:null},w={value:null,prev:y,next:null};y.next=w,this.head=y,this.tail=w,this.length=0}function h(y,w,x){var E=w.next,$={value:x,prev:w,next:E};return w.next=$,E.prev=$,y.length++,$}function p(y,w,x){for(var E=w.next,$=0;$<x&&E!==y.tail;$++)E=E.next;w.next=E,E.prev=w,y.length-=$}function g(y){for(var w=[],x=y.head.next;x!==y.tail;)w.push(x.value),x=x.next;return w}if(!r.document)return r.addEventListener&&(s.disableWorkerMessageHandler||r.addEventListener("message",function(y){var w=JSON.parse(y.data),x=w.language,E=w.code,$=w.immediateClose;r.postMessage(s.highlight(E,s.languages[x],x)),$&&r.close()},!1)),s;var m=s.util.currentScript();m&&(s.filename=m.src,m.hasAttribute("data-manual")&&(s.manual=!0));function v(){s.manual||s.highlightAll()}if(!s.manual){var b=document.readyState;b==="loading"||b==="interactive"&&m&&m.defer?document.addEventListener("DOMContentLoaded",v):window.requestAnimationFrame?window.requestAnimationFrame(v):window.setTimeout(v,16)}return s})(e);t.exports&&(t.exports=n),typeof Z1<"u"&&(Z1.Prism=n),n.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.replace(/&/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(i,o){var a={};a["language-"+o]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[o]},a.cdata=/^<!\[CDATA\[|\]\]>$/i;var s={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:a}};s["language-"+o]={pattern:/[\s\S]+/,inside:n.languages[o]};var l={};l[i]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return i}),"i"),lookbehind:!0,greedy:!0,inside:s},n.languages.insertBefore("markup","cdata",l)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(r,i){n.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[i,"language-"+i],inside:n.languages[i]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,(function(r){var i=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+i.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+i.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+i.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+i.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:i,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var o=r.languages.markup;o&&(o.tag.addInlined("style","css"),o.tag.addAttribute("style","css"))})(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{"class-name":[n.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),n.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),n.languages.markup&&(n.languages.markup.tag.addInlined("script","javascript"),n.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),n.languages.js=n.languages.javascript,(function(){if(typeof n>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r="Loading…",i=function(m,v){return"✖ Error "+m+" while fetching file: "+v},o="✖ Error: File does not exist or is empty",a={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},s="data-src-status",l="loading",u="loaded",d="failed",f="pre[data-src]:not(["+s+'="'+u+'"]):not(['+s+'="'+l+'"])';function h(m,v,b){var y=new XMLHttpRequest;y.open("GET",m,!0),y.onreadystatechange=function(){y.readyState==4&&(y.status<400&&y.responseText?v(y.responseText):y.status>=400?b(i(y.status,y.statusText)):b(o))},y.send(null)}function p(m){var v=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(m||"");if(v){var b=Number(v[1]),y=v[2],w=v[3];return y?w?[b,Number(w)]:[b,void 0]:[b,b]}}n.hooks.add("before-highlightall",function(m){m.selector+=", "+f}),n.hooks.add("before-sanity-check",function(m){var v=m.element;if(v.matches(f)){m.code="",v.setAttribute(s,l);var b=v.appendChild(document.createElement("CODE"));b.textContent=r;var y=v.getAttribute("data-src"),w=m.language;if(w==="none"){var x=(/\.(\w+)$/.exec(y)||[,"none"])[1];w=a[x]||x}n.util.setLanguage(b,w),n.util.setLanguage(v,w);var E=n.plugins.autoloader;E&&E.loadLanguages(w),h(y,function($){v.setAttribute(s,u);var A=p(v.getAttribute("data-range"));if(A){var k=$.split(/\r\n?|\n/g),T=A[0],C=A[1]==null?k.length:A[1];T<0&&(T+=k.length),T=Math.max(0,Math.min(T-1,k.length)),C<0&&(C+=k.length),C=Math.max(0,Math.min(C,k.length)),$=k.slice(T,C).join(`
|
|
383
|
-
`),v.hasAttribute("data-start")||v.setAttribute("data-start",String(T+1))}b.textContent=$,n.highlightElement(b)},function($){v.setAttribute(s,d),b.textContent=$})}}),n.plugins.fileHighlight={highlight:function(v){for(var b=(v||document).querySelectorAll(f),y=0,w;w=b[y++];)n.highlightElement(w)}};var g=!1;n.fileHighlight=function(){g||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),g=!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}})()})(P_)),P_.exports}jV();Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));Prism.languages.js=Prism.languages.javascript;Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]};Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity;Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup;Prism.hooks.add("wrap",function(t){t.type==="entity"&&(t.attributes.title=t.content.replace(/&/,"&"))});Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,n){var r={};r["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[n]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};i["language-"+n]={pattern:/[\s\S]+/,inside:Prism.languages[n]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:i},Prism.languages.insertBefore("markup","cdata",o)}});Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(t,e){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+t+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[e,"language-"+e],inside:Prism.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}});Prism.languages.html=Prism.languages.markup;Prism.languages.mathml=Prism.languages.markup;Prism.languages.svg=Prism.languages.markup;Prism.languages.xml=Prism.languages.extend("markup",{});Prism.languages.ssml=Prism.languages.xml;Prism.languages.atom=Prism.languages.xml;Prism.languages.rss=Prism.languages.xml;(function(t){var e=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(d){return d=d.replace(/<inner>/g,function(){return e}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+d+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;t.languages.markdown=t.languages.extend("markup",{}),t.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:t.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+o+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+o+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:t.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:t.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(d){["url","bold","italic","strike","code-snippet"].forEach(function(f){d!==f&&(t.languages.markdown[d].inside.content.inside[f]=t.languages.markdown[f])})}),t.hooks.add("after-tokenize",function(d){if(d.language!=="markdown"&&d.language!=="md")return;function f(h){if(!(!h||typeof h=="string"))for(var p=0,g=h.length;p<g;p++){var m=h[p];if(m.type!=="code"){f(m.content);continue}var v=m.content[1],b=m.content[3];if(v&&b&&v.type==="code-language"&&b.type==="code-block"&&typeof v.content=="string"){var y=v.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");y=(/[a-z][\w-]*/i.exec(y)||[""])[0].toLowerCase();var w="language-"+y;b.alias?typeof b.alias=="string"?b.alias=[b.alias,w]:b.alias.push(w):b.alias=[w]}}}f(d.tokens)}),t.hooks.add("wrap",function(d){if(d.type==="code-block"){for(var f="",h=0,p=d.classes.length;h<p;h++){var g=d.classes[h],m=/language-(.+)/.exec(g);if(m){f=m[1];break}}var v=t.languages[f];if(v)d.content=t.highlight(u(d.content),v,f);else if(f&&f!=="none"&&t.plugins.autoloader){var b="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);d.attributes.id=b,t.plugins.autoloader.loadLanguages(f,function(){var y=document.getElementById(b);y&&(y.innerHTML=t.highlight(y.textContent,t.languages[f],f))})}}});var a=RegExp(t.languages.markup.tag.pattern.source,"gi"),s={amp:"&",lt:"<",gt:">",quot:'"'},l=String.fromCodePoint||String.fromCharCode;function u(d){var f=d.replace(a,"");return f=f.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(h,p){if(p=p.toLowerCase(),p[0]==="#"){var g;return p[1]==="x"?g=parseInt(p.slice(2),16):g=Number(p.slice(1)),l(g)}else{var m=s[p];return m||h}}),f}t.languages.md=t.languages.markdown})(Prism);Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/});Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}});Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}});Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/});delete Prism.languages.c.boolean;(function(t){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+e.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var n=t.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))})(Prism);Prism.languages.objectivec=Prism.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/});delete Prism.languages.objectivec["class-name"];Prism.languages.objc=Prism.languages.objectivec;Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};(function(t){var e=t.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};e.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:e},boolean:e.boolean,variable:e.variable}})(Prism);var cT={},uT;function UV(){return uT||(uT=1,Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python),cT}UV();var dT={},fT;function BV(){return fT||(fT=1,(function(t){for(var e=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)e=e.replace(/<self>/g,function(){return e});e=e.replace(/<self>/g,function(){return/[^\s\S]/.source}),t.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+e),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},t.languages.rust["closure-params"].inside.rest=t.languages.rust,t.languages.rust.attribute.inside.string=t.languages.rust.string})(Prism)),dT}BV();Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/};Prism.languages.swift["string-literal"].forEach(function(t){t.inside.interpolation.inside=Prism.languages.swift});var hT={},pT;function qV(){return pT||(pT=1,(function(t){t.languages.typescript=t.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),t.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete t.languages.typescript.parameter,delete t.languages.typescript["literal-property"];var e=t.languages.extend("typescript",{});delete e["class-name"],t.languages.typescript["class-name"].inside=e,t.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e}}}}),t.languages.ts=t.languages.typescript})(Prism)),hT}qV();var gT={},mT;function HV(){return mT||(mT=1,(function(t){var e=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};t.languages.java=t.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:e,function:[t.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),t.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),t.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:e,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return e.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(Prism)),gT}HV();var vT={},_T;function KV(){return _T||(_T=1,(function(t){var e=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return e.source});t.languages.cpp=t.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return e.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:e,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),t.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),t.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t.languages.cpp}}}}),t.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),t.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:t.languages.extend("cpp",{})}}),t.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},t.languages.cpp["base-clause"])})(Prism)),vT}KV();function dv(t,...e){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",t);for(const i of e)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const VV="javascript";function UI(t,e){for(const n of t.childNodes){if(In(n)&&n.tagName===e)return!0;UI(n,e)}return!1}const uf="data-language",Hd="data-highlight-language",Ip="data-theme";let Ol=class BI extends ir{__language;__theme;__isSyntaxHighlightSupported;static getType(){return"code"}static clone(e){return new BI(e.__language,e.__key)}constructor(e,n){super(n),this.__language=e||void 0,this.__isSyntaxHighlightSupported=!1,this.__theme=void 0}afterCloneFrom(e){super.afterCloneFrom(e),this.__language=e.__language,this.__theme=e.__theme,this.__isSyntaxHighlightSupported=e.__isSyntaxHighlightSupported}createDOM(e){const n=document.createElement("code");Rr(n,e.theme.code),n.setAttribute("spellcheck","false");const r=this.getLanguage();r&&(n.setAttribute(uf,r),this.getIsSyntaxHighlightSupported()&&n.setAttribute(Hd,r));const i=this.getTheme();i&&n.setAttribute(Ip,i);const o=this.getStyle();return o&&n.setAttribute("style",o),n}updateDOM(e,n,r){const i=this.__language,o=e.__language;i?i!==o&&n.setAttribute(uf,i):o&&n.removeAttribute(uf);const a=this.__isSyntaxHighlightSupported;e.__isSyntaxHighlightSupported&&o?a&&i?i!==o&&n.setAttribute(Hd,i):n.removeAttribute(Hd):a&&i&&n.setAttribute(Hd,i);const s=this.__theme,l=e.__theme;s?s!==l&&n.setAttribute(Ip,s):l&&n.removeAttribute(Ip);const u=this.__style,d=e.__style;return u?u!==d&&n.setAttribute("style",u):d&&n.removeAttribute("style"),!1}exportDOM(e){const n=document.createElement("pre");Rr(n,e._config.theme.code),n.setAttribute("spellcheck","false");const r=this.getLanguage();r&&(n.setAttribute(uf,r),this.getIsSyntaxHighlightSupported()&&n.setAttribute(Hd,r));const i=this.getTheme();i&&n.setAttribute(Ip,i);const o=this.getStyle();return o&&n.setAttribute("style",o),{element:n}}static importDOM(){return{code:e=>e.textContent!=null&&(/\r?\n/.test(e.textContent)||UI(e,"BR"))?{conversion:bT,priority:1}:null,div:()=>({conversion:GV,priority:1}),pre:()=>({conversion:bT,priority:0}),table:e=>O_(e)?{conversion:WV,priority:3}:null,td:e=>{const n=e,r=n.closest("table");return n.classList.contains("js-file-line")||r&&O_(r)?{conversion:yT,priority:3}:null},tr:e=>{const n=e.closest("table");return n&&O_(n)?{conversion:yT,priority:3}:null}}}static importJSON(e){return Io().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setLanguage(e.language).setTheme(e.theme)}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),theme:this.getTheme()}}insertNewAfter(e,n=!0){const r=this.getChildren(),i=r.length;if(i>=2&&r[i-1].getTextContent()===`
|
|
382
|
+
`?r.push(no()):a===" "?r.push(Do()):r.push(zn(a))}this.insertNodes(r)}insertText(e){const n=this.anchor,r=this.focus,i=this.format,o=this.style;let a=n,s=r;!this.isCollapsed()&&r.isBefore(n)&&(a=r,s=n),a.type==="element"&&(function(v,b,y,w){const x=v.getNode(),E=x.getChildAtIndex(v.offset),$=zn();if($.setFormat(y),$.setStyle(w),Vh(E))E.splice(0,0,[$]);else{const A=ur(x)?Tn().append($):$;E===null?x.append(A):E.insertBefore(A)}v.is(b)&&b.set($.__key,0,"text"),v.set($.__key,0,"text")})(a,s,i,o),s.type==="element"&&ch(s,Lo(es(s,"next")));const l=a.offset;let u=s.offset;const d=this.getNodes(),f=d.length;let h=d[0];Ye(h)||Be(26);const p=h.getTextContent().length,g=h.getParentOrThrow();let m=d[f-1];if(f===1&&s.type==="element"&&(u=p,s.set(a.key,u,"text")),this.isCollapsed()&&l===p&&(Ra(h)||!h.canInsertTextAfter()||!g.canInsertTextAfter()&&h.getNextSibling()===null)){let v=h.getNextSibling();if(Ye(v)&&v.canInsertTextBefore()&&!Ra(v)||(v=zn(),v.setFormat(i),v.setStyle(o),g.canInsertTextAfter()?h.insertAfter(v):g.insertAfter(v)),v.select(0,0),h=v,e!=="")return void this.insertText(e)}else if(this.isCollapsed()&&l===0&&(Ra(h)||!h.canInsertTextBefore()||!g.canInsertTextBefore()&&h.getPreviousSibling()===null)){let v=h.getPreviousSibling();if(Ye(v)&&!Ra(v)||(v=zn(),v.setFormat(i),g.canInsertTextBefore()?h.insertBefore(v):g.insertBefore(v)),v.select(),h=v,e!=="")return void this.insertText(e)}else if(h.isSegmented()&&l!==p){const v=zn(h.getTextContent());v.setFormat(i),h.replace(v),h=v}else if(!this.isCollapsed()&&e!==""){const v=m.getParent();if(!g.canInsertTextBefore()||!g.canInsertTextAfter()||we(v)&&(!v.canInsertTextBefore()||!v.canInsertTextAfter()))return this.insertText(""),rI(this.anchor,this.focus,null),void this.insertText(e)}if(f===1){if(Al(h)){const w=zn(e);return w.select(),void h.replace(w)}const v=h.getFormat(),b=h.getStyle();if(l!==u||v===i&&b===o){if(hi(h)){const w=zn(e);return w.setFormat(i),w.setStyle(o),w.select(),void h.replace(w)}}else{if(h.getTextContent()!==""){const w=zn(e);if(w.setFormat(i),w.setStyle(o),w.select(),l===0)h.insertBefore(w,!1);else{const[x]=h.splitText(l);x.insertAfter(w,!1)}return void(w.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=e.length))}h.setFormat(i),h.setStyle(o)}const y=u-l;h=h.spliceText(l,y,e,!0),h.getTextContent()===""?h.remove():this.anchor.type==="text"&&(h.isComposing()?this.anchor.offset-=e.length:(this.format=v,this.style=b))}else{const v=new Set([...h.getParentKeys(),...m.getParentKeys()]),b=we(h)?h:h.getParentOrThrow();let y=we(m)?m:m.getParentOrThrow(),w=m;if(!b.is(y)&&y.isInline())do w=y,y=y.getParentOrThrow();while(y.isInline());if(s.type==="text"&&(u!==0||m.getTextContent()==="")||s.type==="element"&&m.getIndexWithinParent()<u)if(Ye(m)&&!Al(m)&&u!==m.getTextContentSize()){if(m.isSegmented()){const k=zn(m.getTextContent());m.replace(k),m=k}ur(s.getNode())||s.type!=="text"||(m=m.spliceText(0,u,"")),v.add(m.__key)}else{const k=m.getParentOrThrow();k.canBeEmpty()||k.getChildrenSize()!==1?m.remove():k.remove()}else v.add(m.__key);const x=y.getChildren(),E=new Set(d),$=b.is(y),A=b.isInline()&&h.getNextSibling()===null?b:h;for(let k=x.length-1;k>=0;k--){const T=x[k];if(T.is(h)||we(T)&&T.isParentOf(h))break;T.isAttached()&&(!E.has(T)||T.is(w)?$||A.insertAfter(T,!1):T.remove())}if(!$){let k=y,T=null;for(;k!==null;){const C=k.getChildren(),P=C.length;(P===0||C[P-1].is(T))&&(v.delete(k.__key),T=k),k=k.getParent()}}if(Al(h))if(l===p)h.select();else{const k=zn(e);k.select(),h.replace(k)}else h=h.spliceText(l,p-l,e,!0),h.getTextContent()===""?h.remove():h.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=e.length);for(let k=1;k<f;k++){const T=d[k],C=T.__key;v.has(C)||T.remove()}}}removeText(){const e=Ge()===this;ig(this,$9(nT(this))),e&&Ge()!==this&&Br(this)}formatText(e,n=null){if(this.isCollapsed())return this.toggleFormat(e),void Ir(null);const r=this.getNodes(),i=[];for(const x of r)Ye(x)&&i.push(x);const o=x=>{r.forEach(E=>{if(we(E)){const $=E.getFormatFlags(e,x);E.setTextFormat($)}})},a=i.length;if(a===0)return this.toggleFormat(e),Ir(null),void o(n);const s=this.anchor,l=this.focus,u=this.isBackward(),d=u?l:s,f=u?s:l;let h=0,p=i[0],g=d.type==="element"?0:d.offset;if(d.type==="text"&&g===p.getTextContentSize()&&(h=1,p=i[1],g=0),p==null)return;const m=p.getFormatFlags(e,n);o(m);const v=a-1;let b=i[v];const y=f.type==="text"?f.offset:b.getTextContentSize();if(p.is(b)){if(g===y)return;if(Ra(p)||g===0&&y===p.getTextContentSize())p.setFormat(m);else{const x=p.splitText(g,y),E=g===0?x[0]:x[1];E.setFormat(m),d.type==="text"&&d.set(E.__key,0,"text"),f.type==="text"&&f.set(E.__key,y-g,"text")}return void(this.format=m)}g===0||Ra(p)||([,p]=p.splitText(g),g=0),p.setFormat(m);const w=b.getFormatFlags(e,m);y>0&&(y===b.getTextContentSize()||Ra(b)||([b]=b.splitText(y)),b.setFormat(w));for(let x=h+1;x<v;x++){const E=i[x],$=E.getFormatFlags(e,w);E.setFormat($)}d.type==="text"&&d.set(p.__key,g,"text"),f.type==="text"&&f.set(b.__key,y,"text"),this.format=m|w}insertNodes(e){if(e.length===0)return;if(this.isCollapsed()||this.removeText(),this.anchor.key==="root"){this.insertParagraph();const g=Ge();return De(g)||Be(134),g.insertNodes(e)}const n=(this.isBackward()?this.focus:this.anchor).getNode(),r=pi(n,fo),i=e[e.length-1];if(we(r)&&"__language"in r){if("__language"in e[0])this.insertText(e[0].getTextContent());else{const g=E_(this);r.splice(g,0,e),i.selectEnd()}return}if(!e.some(g=>(we(g)||Gt(g))&&!g.isInline())){we(r)||Be(211,n.constructor.name,n.getType());const g=E_(this);return r.splice(g,0,e),void i.selectEnd()}const o=(function(g){const m=Tn();let v=null;for(let b=0;b<g.length;b++){const y=g[b],w=Bn(y);if(w||Gt(y)&&y.isInline()||we(y)&&y.isInline()||Ye(y)||y.isParentRequired()){if(v===null&&(v=y.createParentElementNode(),m.append(v),w))continue;v!==null&&v.append(y)}else m.append(y),v=null}return m})(e),a=o.getLastDescendant(),s=o.getChildren(),l=!we(r)||!r.isEmpty()?this.insertParagraph():null,u=s[s.length-1];let d=s[0];var f;we(f=d)&&fo(f)&&!f.isEmpty()&&we(r)&&(!r.isEmpty()||r.canMergeWhenEmpty())&&(we(r)||Be(211,n.constructor.name,n.getType()),r.append(...d.getChildren()),d=s[1]),d&&(r===null&&Be(212,n.constructor.name,n.getType()),(function(g,m){const v=m.getParentOrThrow().getLastChild();let b=m;const y=[m];for(;b!==v;)b.getNextSibling()||Be(140),b=b.getNextSibling(),y.push(b);let w=g;for(const x of y)w=w.insertAfter(x)})(r,d));const h=pi(a,fo);l&&we(h)&&(l.canMergeWhenEmpty()||fo(u))&&(h.append(...l.getChildren()),l.remove()),we(r)&&r.isEmpty()&&r.remove(),a.selectEnd();const p=we(r)?r.getLastChild():null;Bn(p)&&h!==r&&p.remove()}insertParagraph(){if(this.anchor.key==="root"){const a=Tn();return ar().splice(this.anchor.offset,0,[a]),a.select(),a}const e=E_(this),n=pi(this.anchor.getNode(),fo);we(n)||Be(213);const r=n.getChildAtIndex(e),i=r?[r,...r.getNextSiblings()]:[],o=n.insertNewAfter(this,!1);return o?(o.append(...i),o.selectStart(),o):null}insertLineBreak(e){const n=no();if(this.insertNodes([n]),e){const r=n.getParentOrThrow(),i=n.getIndexWithinParent();r.select(i,i)}}extract(){const e=[...this.getNodes()],n=e.length;let r=e[0],i=e[n-1];const[o,a]=jy(this),s=this.isBackward(),[l,u]=s?[this.focus,this.anchor]:[this.anchor,this.focus],[d,f]=s?[a,o]:[o,a];if(n===0)return[];if(n===1){if(Ye(r)&&!this.isCollapsed()){const h=r.splitText(d,f),p=d===0?h[0]:h[1];return p?(l.set(p.getKey(),0,"text"),u.set(p.getKey(),p.getTextContentSize(),"text"),[p]):[]}return[r]}if(Ye(r)&&(d===r.getTextContentSize()?e.shift():d!==0&&([,r]=r.splitText(d),e[0]=r,l.set(r.getKey(),0,"text"))),Ye(i)){const h=i.getTextContent().length;f===0?e.pop():f!==h&&([i]=i.splitText(f),e[e.length-1]=i,u.set(i.getKey(),i.getTextContentSize(),"text"))}return e}modify(e,n,r){if(DE(this,e,n,r))return;const i=e==="move",o=Vn(),a=Bo(bo(o));if(!a)return;const s=o._blockCursorElement,l=o._rootElement,u=this.focus.getNode();if(l===null||s===null||!we(u)||u.isInline()||u.canBeEmpty()||Ky(s,o,l),this.dirty){let d=Zl(o,this.anchor.key),f=Zl(o,this.focus.key);this.anchor.type==="text"&&(d=Fu(d)),this.focus.type==="text"&&(f=Fu(f)),d&&f&&sI(a,d,this.anchor.offset,f,this.focus.offset)}if((function(d,f,h,p){d.modify(f,h,p)})(a,e,n?"backward":"forward",r),a.rangeCount>0){const d=a.getRangeAt(0),f=this.anchor.getNode(),h=ur(f)?f:d9(f);if(this.applyDOMRange(d),this.dirty=!0,!i){const p=this.getNodes(),g=[];let m=!1;for(let v=0;v<p.length;v++){const b=p[v];Hy(b,h)?g.push(b):m=!0}if(m&&g.length>0)if(n){const v=g[0];we(v)?v.selectStart():v.getParentOrThrow().selectStart()}else{const v=g[g.length-1];we(v)?v.selectEnd():v.getParentOrThrow().selectEnd()}a.anchorNode===d.startContainer&&a.anchorOffset===d.startOffset||(function(v){const b=v.focus,y=v.anchor,w=y.key,x=y.offset,E=y.type;y.set(b.key,b.offset,b.type,!0),b.set(w,x,E,!0)})(this)}}r==="lineboundary"&&DE(this,e,n,r,"decorators")}forwardDeletion(e,n,r){if(!r&&(e.type==="element"&&we(n)&&e.offset===n.getChildrenSize()||e.type==="text"&&e.offset===n.getTextContentSize())){const i=n.getParent(),o=n.getNextSibling()||(i===null?null:i.getNextSibling());if(we(o)&&o.isShadowRoot())return!0}return!1}deleteCharacter(e){const n=this.isCollapsed();if(this.isCollapsed()){const r=this.anchor;let i=r.getNode();if(this.forwardDeletion(r,i,e))return;const o=W0(es(r,e?"previous":"next"));if(o.getTextSlices().every(s=>s===null||s.distance===0)){let s={type:"initial"};for(const l of o.iterNodeCarets("shadowRoot"))if(pa(l)){if(!l.origin.isInline()){if(l.origin.isShadowRoot()){if(s.type==="merge-block")break;if(we(o.anchor.origin)&&o.anchor.origin.isEmpty()){const u=Lo(l);ig(this,Qa(u,u)),o.anchor.origin.remove()}return}s.type!=="merge-next-block"&&s.type!=="merge-block"||(s={block:s.block,caret:l,type:"merge-block"})}}else{if(s.type==="merge-block")break;if(tc(l)){if(we(l.origin)){if(l.origin.isInline()){if(!l.origin.isParentOf(o.anchor.origin))break}else s={block:l.origin,type:"merge-next-block"};continue}if(Gt(l.origin)){if(!l.origin.isIsolated())if(s.type==="merge-next-block"&&(l.origin.isKeyboardSelectable()||!l.origin.isInline())&&we(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const u=aI();u.add(l.origin.getKey()),Br(u)}else l.origin.remove();return}break}}if(s.type==="merge-block"){const{caret:l,block:u}=s;return ig(this,Qa(!l.origin.isEmpty()&&u.isEmpty()?J0(Cr(u,l.direction)):o.anchor,l)),this.removeText()}}const a=this.focus;if(this.modify("extend",e,"character"),this.isCollapsed()){if(e&&r.offset===0&&OE(this,r.getNode()))return}else{const s=a.type==="text"?a.getNode():null;if(i=r.type==="text"?r.getNode():null,s!==null&&s.isSegmented()){const l=a.offset,u=s.getTextContentSize();if(s.is(i)||e&&l!==u||!e&&l!==0)return void LE(s,e,l)}else if(i!==null&&i.isSegmented()){const l=r.offset,u=i.getTextContentSize();if(i.is(s)||e&&l!==0||!e&&l!==u)return void LE(i,e,l)}(function(l,u){const d=l.anchor,f=l.focus,h=d.getNode(),p=f.getNode();if(h===p&&d.type==="text"&&f.type==="text"){const g=d.offset,m=f.offset,v=g<m,b=v?g:m,y=v?m:g,w=y-1;b!==w&&(function(x){return!(yI(x)||KV(x))})(h.getTextContent().slice(b,y))&&(u?f.set(f.key,w,f.type):d.set(d.key,w,d.type))}})(this,e)}}if(this.removeText(),e&&!n&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const r=this.anchor.getNode();r.isEmpty()&&ur(r.getParent())&&r.getPreviousSibling()===null&&OE(this,r)}}deleteLine(e){this.isCollapsed()&&this.modify("extend",e,"lineboundary"),this.isCollapsed()?this.deleteCharacter(e):this.removeText()}deleteWord(e){if(this.isCollapsed()){const n=this.anchor,r=n.getNode();if(this.forwardDeletion(n,r,e))return;this.modify("extend",e,"word")}this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function ai(t){return t instanceof rv}function PE(t){const e=t.offset;if(t.type==="text")return e;const n=t.getNode();return e===n.getChildrenSize()?n.getTextContent().length:0}function jy(t){const e=t.getStartEndPoints();if(e===null)return[0,0];const[n,r]=e;return n.type==="element"&&r.type==="element"&&n.key===r.key&&n.offset===r.offset?[0,0]:[PE(n),PE(r)]}function OE(t,e){for(let n=e;n;n=n.getParent()){if(we(n)){if(n.collapseAtStart(t))return!0;if(Yi(n))break}if(n.getPreviousSibling())break}return!1}const KV=(()=>{try{const t=new RegExp("\\p{Emoji}","u"),e=t.test.bind(t);if(e("❤️")&&e("#️⃣")&&e("👍"))return e}catch{}return()=>!1})();function LE(t,e,n){const r=t,i=r.getTextContent().split(/(?=\s)/g),o=i.length;let a=0,s=0;for(let u=0;u<o;u++){const d=u===o-1;if(s=a,a+=i[u].length,e&&a===n||a>n||d){i.splice(u,1),d&&(s=void 0);break}}const l=i.join("").trim();l===""?r.remove():(r.setTextContent(l),r.select(s,s))}function IE(t,e,n,r){let i,o=e;if(In(t)){let a=!1;const s=t.childNodes,l=s.length,u=r._blockCursorElement;o===l&&(a=!0,o=l-1);let d=s[o],f=!1;if(d===u)d=s[o+1],f=!0;else if(u!==null){const h=u.parentNode;t===h&&e>Array.prototype.indexOf.call(h.children,u)&&o--}if(i=Qc(d),Ye(i))o=Is(i,a?"next":"previous");else{let h=Qc(t);if(h===null)return null;if(we(h)){const p=r.getElementByKey(h.getKey());p===null&&Be(214),[h,o]=h.getDOMSlot(p).resolveChildIndex(h,p,t,e),we(h)||Be(215),a&&o>=h.getChildrenSize()&&(o=Math.max(0,h.getChildrenSize()-1));let m=h.getChildAtIndex(o);if(we(m)&&(function(v,b,y){const w=v.getParent();return y===null||w===null||!w.canBeEmpty()||w!==y.getNode()})(m,0,n)){const v=a?m.getLastDescendant():m.getFirstDescendant();v===null?h=m:(m=v,h=we(m)?m:m.getParentOrThrow()),o=0}Ye(m)?(i=m,h=null,o=Is(m,a?"next":"previous")):m!==h&&a&&!f&&(we(h)||Be(216),o=Math.min(h.getChildrenSize(),o+1))}else{const p=h.getIndexWithinParent();o=e===0&&Gt(h)&&Qc(t)===h?p:p+1,h=h.getParentOrThrow()}if(we(h))return Ri(h.__key,o,"element")}}else i=Qc(t);return Ye(i)?Ri(i.__key,Is(i,o,"clamp"),"text"):null}function NE(t,e,n){const r=t.offset,i=t.getNode();if(r===0){const o=i.getPreviousSibling(),a=i.getParent();if(e){if((n||!e)&&o===null&&we(a)&&a.isInline()){const s=a.getPreviousSibling();Ye(s)&&t.set(s.__key,s.getTextContent().length,"text")}}else we(o)&&!n&&o.isInline()?t.set(o.__key,o.getChildrenSize(),"element"):Ye(o)&&t.set(o.__key,o.getTextContent().length,"text")}else if(r===i.getTextContent().length){const o=i.getNextSibling(),a=i.getParent();if(e&&we(o)&&o.isInline())t.set(o.__key,0,"element");else if((n||e)&&o===null&&we(a)&&a.isInline()&&!a.canInsertTextAfter()){const s=a.getNextSibling();Ye(s)&&t.set(s.__key,0,"text")}}}function rI(t,e,n){if(t.type==="text"&&e.type==="text"){const r=t.isBefore(e),i=t.is(e);NE(t,r,i),NE(e,!r,i),i&&e.set(t.key,t.offset,t.type);const o=Vn();if(o.isComposing()&&o._compositionKey!==t.key&&De(n)){const a=n.anchor,s=n.focus;t.set(a.key,a.offset,a.type,!0),e.set(s.key,s.offset,s.type,!0)}}}function iI(t,e,n,r,i,o){if(t===null||n===null||!Gh(i,t,n))return null;const a=IE(t,e,De(o)?o.anchor:null,i);if(a===null)return null;const s=IE(n,r,De(o)?o.focus:null,i);if(s===null)return null;if(a.type==="element"&&s.type==="element"){const l=Qc(t),u=Qc(n);if(Gt(l)&&Gt(u))return null}return rI(a,s,o),[a,s]}function Uy(t){return we(t)&&!t.isInline()}function oI(t,e,n,r,i,o){const a=tl(),s=new yc(Ri(t,e,i),Ri(n,r,o),0,"");return s.dirty=!0,a._selection=s,s}function iv(){const t=Ri("root",0,"element"),e=Ri("root",0,"element");return new yc(t,e,0,"")}function aI(){return new rv(new Set)}function C0(t,e,n,r){const i=n._window;if(i===null)return null;const o=r||i.event,a=o?o.type:void 0,s=a==="selectionchange",l=!xy&&(s||a==="beforeinput"||a==="compositionstart"||a==="compositionend"||a==="click"&&o&&o.detail===3||a==="drop"||a===void 0);let u,d,f,h;if(De(t)&&!l)return t.clone();if(e===null)return null;if(u=e.anchorNode,d=e.focusNode,f=e.anchorOffset,h=e.focusOffset,(s||a===void 0)&&De(t)&&!Gh(n,u,d))return t.clone();const p=iI(u,f,d,h,n,t);if(p===null)return null;const[g,m]=p;return new yc(g,m,De(t)?t.format:0,De(t)?t.style:"")}function Ge(){return tl()._selection}function wc(){return Vn()._editorState._selection}function qg(t,e,n,r=1){const i=t.anchor,o=t.focus,a=i.getNode(),s=o.getNode();if(!e.is(a)&&!e.is(s))return;const l=e.__key;if(t.isCollapsed()){const u=i.offset;if(n<=u&&r>0||n<u&&r<0){const d=Math.max(0,u+r);i.set(l,d,"element"),o.set(l,d,"element"),RE(t)}}else{const u=t.isBackward(),d=u?o:i,f=d.getNode(),h=u?i:o,p=h.getNode();if(e.is(f)){const g=d.offset;(n<=g&&r>0||n<g&&r<0)&&d.set(l,Math.max(0,g+r),"element")}if(e.is(p)){const g=h.offset;(n<=g&&r>0||n<g&&r<0)&&h.set(l,Math.max(0,g+r),"element")}}RE(t)}function RE(t){const e=t.anchor,n=e.offset,r=t.focus,i=r.offset,o=e.getNode(),a=r.getNode();if(t.isCollapsed()){if(!we(o))return;const s=o.getChildrenSize(),l=n>=s,u=l?o.getChildAtIndex(s-1):o.getChildAtIndex(n);if(Ye(u)){let d=0;l&&(d=u.getTextContentSize()),e.set(u.__key,d,"text"),r.set(u.__key,d,"text")}return}if(we(o)){const s=o.getChildrenSize(),l=n>=s,u=l?o.getChildAtIndex(s-1):o.getChildAtIndex(n);if(Ye(u)){let d=0;l&&(d=u.getTextContentSize()),e.set(u.__key,d,"text")}}if(we(a)){const s=a.getChildrenSize(),l=i>=s,u=l?a.getChildAtIndex(s-1):a.getChildAtIndex(i);if(Ye(u)){let d=0;l&&(d=u.getTextContentSize()),r.set(u.__key,d,"text")}}}function Hg(t,e,n,r,i){let o=null,a=0,s=null;r!==null?(o=r.__key,Ye(r)?(a=r.getTextContentSize(),s="text"):we(r)&&(a=r.getChildrenSize(),s="element")):i!==null&&(o=i.__key,Ye(i)?s="text":we(i)&&(s="element")),o!==null&&s!==null?t.set(o,a,s):(a=e.getIndexWithinParent(),a===-1&&(a=n.getChildrenSize()),t.set(n.__key,a,"element"))}function ME(t,e,n,r,i){t.type==="text"?t.set(n,t.offset+(e?0:i),"text"):t.offset>r.getIndexWithinParent()&&t.set(t.key,t.offset-1,"element")}function sI(t,e,n,r,i){try{t.setBaseAndExtent(e,n,r,i)}catch{}}function VV(t,e,n,r,i,o,a){const s=r.anchorNode,l=r.focusNode,u=r.anchorOffset,d=r.focusOffset,f=document.activeElement;if(i.has(NV)&&f!==o||f!==null&&M0(f))return;if(!De(e))return void(t!==null&&Gh(n,s,l)&&r.removeAllRanges());const h=e.anchor,p=e.focus,g=h.key,m=p.key,v=Zl(n,g),b=Zl(n,m),y=h.offset,w=p.offset,x=e.format,E=e.style,$=e.isCollapsed();let A=v,k=b,T=!1;if(h.type==="text"){A=Fu(v);const D=h.getNode();T=D.getFormat()!==x||D.getStyle()!==E}else De(t)&&t.anchor.type==="text"&&(T=!0);var C,P,O,I,L;if(p.type==="text"&&(k=Fu(b)),A!==null&&k!==null&&($&&(t===null||T||De(t)&&(t.format!==x||t.style!==E))&&(C=x,P=E,O=y,I=g,L=performance.now(),WL=[C,P,O,I,L]),u!==y||d!==w||s!==A||l!==k||r.type==="Range"&&$||(f!==null&&o.contains(f)||i.has(DV)||o.focus({preventScroll:!0}),h.type==="element"))){if(sI(r,A,y,k,w),!i.has(RV)&&e.isCollapsed()&&o!==null&&o===document.activeElement){const D=De(e)&&e.anchor.type==="element"?A.childNodes[y]||null:r.rangeCount>0?r.getRangeAt(0):null;if(D!==null){let B;if(D instanceof Text){const K=document.createRange();K.selectNode(D),B=K.getBoundingClientRect()}else B=D.getBoundingClientRect();(function(K,G,W){const Y=SI(W),R=B0(Y);if(Y===null||R===null)return;let{top:q,bottom:J}=G,Q=0,ee=0,re=W;for(;re!==null;){const te=re===Y.body;if(te)Q=0,ee=bo(K).innerHeight;else{const he=re.getBoundingClientRect();Q=he.top,ee=he.bottom}let de=0;if(q<Q?de=-(Q-q):J>ee&&(de=J-ee),de!==0)if(te)R.scrollBy(0,de);else{const he=re.scrollTop;re.scrollTop+=de;const ue=re.scrollTop-he;q-=ue,J-=ue}if(te)break;re=Wh(re)}})(n,B,o)}}My=!0}}function yd(t){let e=Ge()||wc();e===null&&(e=ar().selectEnd()),e.insertNodes(t)}function GV(){const t=Ge();return t===null?"":t.getTextContent()}function E_(t){let e=t;t.isCollapsed()||e.removeText();const n=Ge();De(n)&&(e=n),De(e)||Be(161);const r=e.anchor;let i=r.getNode(),o=r.offset;for(;!fo(i);){const a=i;if([i,o]=WV(i,o),a.is(i))break}return o}function WV(t,e){const n=t.getParent();if(!n){const i=Tn();return ar().append(i),i.select(),[ar(),0]}if(Ye(t)){const i=t.splitText(e);if(i.length===0)return[n,t.getIndexWithinParent()];const o=e===0?0:1;return[n,i[0].getIndexWithinParent()+o]}if(!we(t)||e===0)return[n,t.getIndexWithinParent()];const r=t.getChildAtIndex(e);if(r){const i=new yc(Ri(t.__key,e,"element"),Ri(t.__key,e,"element"),0,""),o=t.insertNewAfter(i);o&&o.append(r,...r.getNextSiblings())}return[n,t.getIndexWithinParent()+1]}function DE(t,e,n,r,i="decorators-and-blocks"){if(e==="move"&&r==="character"&&!t.isCollapsed()){const[d,f]=n===t.isBackward()?[t.focus,t.anchor]:[t.anchor,t.focus];return f.set(d.key,d.offset,d.type),!0}const o=es(t.focus,n?"previous":"next"),a=r==="lineboundary",s=e==="move";let l=o,u=i==="decorators-and-blocks";if(!PI(l)){for(const d of l){u=!1;const{origin:f}=d;if(!Gt(f)||f.isIsolated()||(l=d,!a||!f.isInline()))break}if(u)for(const d of W0(o).iterNodeCarets(e==="extend"?"shadowRoot":"root")){if(pa(d))d.origin.isInline()||(l=d);else{if(we(d.origin))continue;Gt(d.origin)&&!d.origin.isInline()&&(l=d)}break}}if(l===o)return!1;if(s&&!a&&Gt(l.origin)&&l.origin.isKeyboardSelectable()){const d=aI();return d.add(l.origin.getKey()),Br(d),!0}return l=Lo(l),s&&ch(t.anchor,l),ch(t.focus,l),u||!a}let $r=null,Ar=null,Li=!1,T_=!1,ng=0;const FE={characterData:!0,childList:!0,subtree:!0};function Hh(){return Li||$r!==null&&$r._readOnly}function Tr(){Li&&Be(13)}function lI(){ng>99&&Be(14)}function tl(){return $r===null&&Be(195,cI()),$r}function Vn(){return Ar===null&&Be(196,cI()),Ar}function cI(){let t=0;const e=new Set,n=Du.version;if(typeof window<"u")for(const i of document.querySelectorAll("[contenteditable]")){const o=sv(i);if(D0(o))t++;else if(o){let a=String(o.constructor.version||"<0.17.1");a===n&&(a+=" (separately built, likely a bundler configuration issue)"),e.add(a)}}let r=` Detected on the page: ${t} compatible editor(s) with version ${n}`;return e.size&&(r+=` and incompatible editors with versions ${Array.from(e).join(", ")}`),r}function YV(){return Ar}function zE(t,e,n){const r=e.__type,i=gI(t,r);let o=n.get(r);o===void 0&&(o=Array.from(i.transforms),n.set(r,o));const a=o.length;for(let s=0;s<a&&(o[s](e),e.isAttached());s++);}function jE(t,e){return t!==void 0&&t.__key!==e&&t.isAttached()}function uI(t,e){if(!e)return;const n=t._updateTags;let r=e;Array.isArray(e)||(r=[e]);for(const i of r)n.add(i)}function JV(t){return P0(t,Vn()._nodes)}function P0(t,e){const n=t.type,r=e.get(n);r===void 0&&Be(17,n);const i=r.klass;t.type!==i.getType()&&Be(18,i.name);const o=i.importJSON(t),a=t.children;if(we(o)&&Array.isArray(a))for(let s=0;s<a.length;s++){const l=P0(a[s],e);o.append(l)}return o}function UE(t,e,n){const r=$r,i=Li,o=Ar;$r=e,Li=!0,Ar=t;try{return n()}finally{$r=r,Li=i,Ar=o}}function Fa(t,e){const n=t._pendingEditorState,r=t._rootElement,i=t._headless||r===null;if(n===null)return;const o=t._editorState,a=o._selection,s=n._selection,l=t._dirtyType!==0,u=$r,d=Li,f=Ar,h=t._updating,p=t._observer;let g=null;if(t._pendingEditorState=null,t._editorState=n,!i&&l&&p!==null){Ar=t,$r=n,Li=!1,t._updating=!0;try{const $=t._dirtyType,A=t._dirtyElements,k=t._dirtyLeaves;p.disconnect(),g=xV(o,n,t,$,A,k)}catch($){if($ instanceof Error&&t._onError($),T_)throw $;return hI(t,null,r,n),EL(t),t._dirtyType=2,T_=!0,Fa(t,o),void(T_=!1)}finally{p.observe(r,FE),t._updating=h,$r=u,Li=d,Ar=f}}n._readOnly||(n._readOnly=!0);const m=t._dirtyLeaves,v=t._dirtyElements,b=t._normalizedNodes,y=t._updateTags,w=t._deferred;l&&(t._dirtyType=0,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements=new Map,t._normalizedNodes=new Set,t._updateTags=new Set),(function($,A){const k=$._decorators;let T=$._pendingDecorators||k;const C=A._nodeMap;let P;for(P in T)C.has(P)||(T===k&&(T=_I($)),delete T[P])})(t,n);const x=i?null:Bo(bo(t));if(t._editable&&x!==null&&(l||s===null||s.dirty||!s.is(a))&&r!==null&&!y.has(MV)){Ar=t,$r=n;try{if(p!==null&&p.disconnect(),l||s===null||s.dirty){const $=t._blockCursorElement;$!==null&&Ky($,t,r),VV(a,s,t,x,y,r)}(function($,A,k){let T=$._blockCursorElement;if(De(k)&&k.isCollapsed()&&k.anchor.type==="element"&&A.contains(document.activeElement)){const C=k.anchor,P=C.getNode(),O=C.offset;let I=!1,L=null;if(O===P.getChildrenSize())A_(P.getChildAtIndex(O-1))&&(I=!0);else{const D=P.getChildAtIndex(O);if(D!==null&&A_(D)){const B=D.getPreviousSibling();(B===null||A_(B))&&(I=!0,L=$.getElementByKey(D.__key))}}if(I){const D=$.getElementByKey(P.__key);return T===null&&($._blockCursorElement=T=(function(B){const K=B.theme,G=document.createElement("div");G.contentEditable="false",G.setAttribute("data-lexical-cursor","true");let W=K.blockCursor;if(W!==void 0){if(typeof W=="string"){const Y=_L(W);W=K.blockCursor=Y}W!==void 0&&G.classList.add(...W)}return G})($._config)),A.style.caretColor="transparent",void(L===null?D.appendChild(T):D.insertBefore(T,L))}}T!==null&&Ky(T,$,A)})(t,r,s)}finally{p!==null&&p.observe(r,FE),Ar=f,$r=u}}g!==null&&(function($,A,k,T,C){const P=Array.from($._listeners.mutation),O=P.length;for(let I=0;I<O;I++){const[L,D]=P[I];for(const B of D){const K=A.get(B);K!==void 0&&L(K,{dirtyLeaves:T,prevEditorState:C,updateTags:k})}}})(t,g,y,m,o),De(s)||s===null||a!==null&&a.is(s)||t.dispatchCommand(NL,void 0);const E=t._pendingDecorators;E!==null&&(t._decorators=E,t._pendingDecorators=null,Af("decorator",t,!0,E)),(function($,A,k){const T=VE(A),C=VE(k);T!==C&&Af("textcontent",$,!0,C)})(t,e||o,n),Af("update",t,!0,{dirtyElements:v,dirtyLeaves:m,editorState:n,mutatedNodes:g,normalizedNodes:b,prevEditorState:e||o,tags:y}),(function($,A){if($._deferred=[],A.length!==0){const k=$._updating;$._updating=!0;try{for(let T=0;T<A.length;T++)A[T]()}finally{$._updating=k}}})(t,w),(function($){const A=$._updates;if(A.length!==0){const k=A.shift();if(k){const[T,C]=k;ov($,T,C)}}})(t)}function Af(t,e,n,...r){const i=e._updating;e._updating=n;try{const o=Array.from(e._listeners[t]);for(let a=0;a<o.length;a++)o[a].apply(null,r)}finally{e._updating=i}}function BE(t,e){const n=t._updates;let r=e||!1;for(;n.length!==0;){const i=n.shift();if(i){const[o,a]=i,s=t._pendingEditorState;let l;a!==void 0&&(l=a.onUpdate,a.skipTransforms&&(r=!0),a.discrete&&(s===null&&Be(191),s._flushSync=!0),l&&t._deferred.push(l),uI(t,a.tag)),s==null?ov(t,o,a):o()}}return r}function ov(t,e,n){const r=t._updateTags;let i,o=!1,a=!1;n!==void 0&&(i=n.onUpdate,uI(t,n.tag),o=n.skipTransforms||!1,a=n.discrete||!1),i&&t._deferred.push(i);const s=t._editorState;let l=t._pendingEditorState,u=!1;(l===null||l._readOnly)&&(l=t._pendingEditorState=dI(l||s),u=!0),l._flushSync=a;const d=$r,f=Li,h=Ar,p=t._updating;$r=l,Li=!1,t._updating=!0,Ar=t;const g=t._headless||t.getRootElement()===null;N0(null);try{u&&(g?s._selection!==null&&(l._selection=s._selection.clone()):l._selection=(function(y,w){const x=y.getEditorState()._selection,E=Bo(bo(y));return De(x)||x==null?C0(x,E,y,w):x.clone()})(t,n&&n.event||null));const v=t._compositionKey;e(),o=BE(t,o),(function(y,w){const x=w.getEditorState()._selection,E=y._selection;if(De(E)){const $=E.anchor,A=E.focus;let k;if($.type==="text"&&(k=$.getNode(),k.selectionTransform(x,E)),A.type==="text"){const T=A.getNode();k!==T&&T.selectionTransform(x,E)}}})(l,t),t._dirtyType!==0&&(o?(function(y,w){const x=w._dirtyLeaves,E=y._nodeMap;for(const $ of x){const A=E.get($);Ye(A)&&A.isAttached()&&A.isSimpleText()&&!A.isUnmergeable()&&bE(A)}})(l,t):(function(y,w){const x=w._dirtyLeaves,E=w._dirtyElements,$=y._nodeMap,A=ks(),k=new Map;let T=x,C=T.size,P=E,O=P.size;for(;C>0||O>0;){if(C>0){w._dirtyLeaves=new Set;for(const I of T){const L=$.get(I);Ye(L)&&L.isAttached()&&L.isSimpleText()&&!L.isUnmergeable()&&bE(L),L!==void 0&&jE(L,A)&&zE(w,L,k),x.add(I)}if(T=w._dirtyLeaves,C=T.size,C>0){ng++;continue}}w._dirtyLeaves=new Set,w._dirtyElements=new Map,P.delete("root")&&P.set("root",!0);for(const I of P){const L=I[0],D=I[1];if(E.set(L,D),!D)continue;const B=$.get(L);B!==void 0&&jE(B,A)&&zE(w,B,k)}T=w._dirtyLeaves,C=T.size,P=w._dirtyElements,O=P.size,ng++}w._dirtyLeaves=x,w._dirtyElements=E})(l,t),BE(t),(function(y,w,x,E){const $=y._nodeMap,A=w._nodeMap,k=[];for(const[T]of E){const C=A.get(T);C!==void 0&&(C.isAttached()||(we(C)&&xL(C,T,$,A,k,E),$.has(T)||E.delete(T),k.push(T)))}for(const T of k)A.delete(T);for(const T of x){const C=A.get(T);C===void 0||C.isAttached()||($.has(T)||x.delete(T),A.delete(T))}})(s,l,t._dirtyLeaves,t._dirtyElements)),v!==t._compositionKey&&(l._flushSync=!0);const b=l._selection;if(De(b)){const y=l._nodeMap,w=b.anchor.key,x=b.focus.key;y.get(w)!==void 0&&y.get(x)!==void 0||Be(19)}else ai(b)&&b._nodes.size===0&&(l._selection=null)}catch(v){return v instanceof Error&&t._onError(v),t._pendingEditorState=s,t._dirtyType=2,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements.clear(),void Fa(t)}finally{$r=d,Li=f,Ar=h,t._updating=p,ng=0}t._dirtyType!==0||t._deferred.length>0||(function(v,b){const y=b.getEditorState()._selection,w=v._selection;if(w!==null){if(w.dirty||!w.is(y))return!0}else if(y!==null)return!0;return!1})(l,t)?l._flushSync?(l._flushSync=!1,Fa(t)):u&&n9(()=>{Fa(t)}):(l._flushSync=!1,u&&(r.clear(),t._deferred=[],t._pendingEditorState=null))}function Ui(t,e,n){Ar===t&&n===void 0?e():ov(t,e,n)}class Cf{element;before;after;constructor(e,n,r){this.element=e,this.before=n||null,this.after=r||null}withBefore(e){return new Cf(this.element,e,this.after)}withAfter(e){return new Cf(this.element,this.before,e)}withElement(e){return this.element===e?this:new Cf(e,this.before,this.after)}insertChild(e){const n=this.before||this.getManagedLineBreak();return n!==null&&n.parentElement!==this.element&&Be(222),this.element.insertBefore(e,n),this}removeChild(e){return e.parentElement!==this.element&&Be(223),this.element.removeChild(e),this}replaceChild(e,n){return n.parentElement!==this.element&&Be(224),this.element.replaceChild(e,n),this}getFirstChild(){const e=this.after?this.after.nextSibling:this.element.firstChild;return e===this.before||e===this.getManagedLineBreak()?null:e}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(e){if(e===null)this.removeManagedLineBreak();else{const n=e==="decorator"&&(nh||Nu||th);this.insertManagedLineBreak(n)}}removeManagedLineBreak(){const e=this.getManagedLineBreak();if(e){const n=this.element,r=e.nodeName==="IMG"?e.nextSibling:null;r&&n.removeChild(r),n.removeChild(e),n.__lexicalLineBreak=void 0}}insertManagedLineBreak(e){const n=this.getManagedLineBreak();if(n){if(e===(n.nodeName==="IMG"))return;this.removeManagedLineBreak()}const r=this.element,i=this.before,o=document.createElement("br");if(r.insertBefore(o,i),e){const a=document.createElement("img");a.setAttribute("data-lexical-linebreak","true"),a.style.cssText="display: inline !important; border: 0px !important; margin: 0px !important;",a.alt="",r.insertBefore(a,o),r.__lexicalLineBreak=a}else r.__lexicalLineBreak=o}getFirstChildOffset(){let e=0;for(let n=this.after;n!==null;n=n.previousSibling)e++;return e}resolveChildIndex(e,n,r,i){if(r===this.element){const l=this.getFirstChildOffset();return[e,Math.min(l+e.getChildrenSize(),Math.max(l,i))]}const o=qE(n,r);o.push(i);const a=qE(n,this.element);let s=e.getIndexWithinParent();for(let l=0;l<a.length;l++){const u=o[l],d=a[l];if(u===void 0||u<d)break;if(u>d){s+=1;break}}return[e.getParentOrThrow(),s]}}function qE(t,e){const n=[];let r=e;for(;r!==t&&r!==null;r=r.parentNode){let i=0;for(let o=r.previousSibling;o!==null;o=o.previousSibling)i++;n.push(i)}return r!==t&&Be(225),n.reverse()}class ir extends ha{__first;__last;__size;__format;__style;__indent;__dir;__textFormat;__textStyle;constructor(e){super(e),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle=""}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__first=e.__first,this.__last=e.__last,this.__size=e.__size),this.__indent=e.__indent,this.__format=e.__format,this.__style=e.__style,this.__dir=e.__dir,this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){const e=this.getFormat();return lV[e]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const e=[];let n=this.getFirstChild();for(;n!==null;)e.push(n),n=n.getNextSibling();return e}getChildrenKeys(){const e=[];let n=this.getFirstChild();for(;n!==null;)e.push(n.__key),n=n.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){const e=Vn()._dirtyElements;return e!==null&&e.has(this.__key)}isLastChild(){const e=this.getLatest(),n=this.getParentOrThrow().getLastChild();return n!==null&&n.is(e)}getAllTextNodes(){const e=[];let n=this.getFirstChild();for(;n!==null;){if(Ye(n)&&e.push(n),we(n)){const r=n.getAllTextNodes();e.push(...r)}n=n.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;we(e);){const n=e.getFirstChild();if(n===null)break;e=n}return e}getLastDescendant(){let e=this.getLastChild();for(;we(e);){const n=e.getLastChild();if(n===null)break;e=n}return e}getDescendantByIndex(e){const n=this.getChildren(),r=n.length;if(e>=r){const o=n[r-1];return we(o)&&o.getLastDescendant()||o||null}const i=n[e];return we(i)&&i.getFirstDescendant()||i||null}getFirstChild(){const e=this.getLatest().__first;return e===null?null:qn(e)}getFirstChildOrThrow(){const e=this.getFirstChild();return e===null&&Be(45,this.__key),e}getLastChild(){const e=this.getLatest().__last;return e===null?null:qn(e)}getLastChildOrThrow(){const e=this.getLastChild();return e===null&&Be(96,this.__key),e}getChildAtIndex(e){const n=this.getChildrenSize();let r,i;if(e<n/2){for(r=this.getFirstChild(),i=0;r!==null&&i<=e;){if(i===e)return r;r=r.getNextSibling(),i++}return null}for(r=this.getLastChild(),i=n-1;r!==null&&i>=e;){if(i===e)return r;r=r.getPreviousSibling(),i--}return null}getTextContent(){let e="";const n=this.getChildren(),r=n.length;for(let i=0;i<r;i++){const o=n[i];e+=o.getTextContent(),we(o)&&i!==r-1&&!o.isInline()&&(e+=js)}return e}getTextContentSize(){let e=0;const n=this.getChildren(),r=n.length;for(let i=0;i<r;i++){const o=n[i];e+=o.getTextContentSize(),we(o)&&i!==r-1&&!o.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(e){if(e!==""){const n=dE[e];return(this.getFormat()&n)!==0}return!1}hasTextFormat(e){const n=Yl[e];return(this.getTextFormat()&n)!==0}getFormatFlags(e,n){return Kg(this.getLatest().__textFormat,e,n)}getTextStyle(){return this.getLatest().__textStyle}select(e,n){Tr();const r=Ge();let i=e,o=n;const a=this.getChildrenSize();if(!this.canBeEmpty()){if(e===0&&n===0){const l=this.getFirstChild();if(Ye(l)||we(l))return l.select(0,0)}else if(!(e!==void 0&&e!==a||n!==void 0&&n!==a)){const l=this.getLastChild();if(Ye(l)||we(l))return l.select()}}i===void 0&&(i=a),o===void 0&&(o=a);const s=this.__key;return De(r)?(r.anchor.set(s,i,"element"),r.focus.set(s,o,"element"),r.dirty=!0,r):oI(s,i,s,o,"element","element")}selectStart(){const e=this.getFirstDescendant();return e?e.selectStart():this.select()}selectEnd(){const e=this.getLastDescendant();return e?e.selectEnd():this.select()}clear(){const e=this.getWritable();return this.getChildren().forEach(n=>n.remove()),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){const n=this.getWritable();return n.__dir=e,n}setFormat(e){return this.getWritable().__format=e!==""?dE[e]:0,this}setStyle(e){return this.getWritable().__style=e||"",this}setTextFormat(e){const n=this.getWritable();return n.__textFormat=e,n}setTextStyle(e){const n=this.getWritable();return n.__textStyle=e,n}setIndent(e){return this.getWritable().__indent=e,this}splice(e,n,r){Bg(this)&&Be(324,this.__key,this.__type);const i=this.getChildrenSize(),o=this.getWritable();e+n<=i||Be(226,String(e),String(n),String(i));const a=o.__key,s=[],l=[],u=this.getChildAtIndex(e+n);let d=null,f=i-n+r.length;if(e!==0)if(e===i)d=this.getLastChild();else{const p=this.getChildAtIndex(e);p!==null&&(d=p.getPreviousSibling())}if(n>0){let p=d===null?this.getFirstChild():d.getNextSibling();for(let g=0;g<n;g++){p===null&&Be(100);const m=p.getNextSibling(),v=p.__key;Cl(p.getWritable()),l.push(v),p=m}}let h=d;for(const p of r){h!==null&&p.is(h)&&(d=h=h.getPreviousSibling());const g=p.getWritable();g.__parent===a&&f--,Cl(g);const m=p.__key;if(h===null)o.__first=m,g.__prev=null;else{const v=h.getWritable();v.__next=m,g.__prev=v.__key}p.__key===a&&Be(76),g.__parent=a,s.push(m),h=p}if(e+n===i)h!==null&&(h.getWritable().__next=null,o.__last=h.__key);else if(u!==null){const p=u.getWritable();if(h!==null){const g=h.getWritable();p.__prev=h.__key,g.__next=u.__key}else p.__prev=null}if(o.__size=f,l.length){const p=Ge();if(De(p)){const g=new Set(l),m=new Set(s),{anchor:v,focus:b}=p;HE(v,g,m)&&Hg(v,v.getNode(),this,d,u),HE(b,g,m)&&Hg(b,b.getNode(),this,d,u),f!==0||this.canBeEmpty()||Yi(this)||this.remove()}}return o}getDOMSlot(e){return new Cf(e)}exportDOM(e){const{element:n}=super.exportDOM(e);if(In(n)){const r=this.getIndent();r>0&&(n.style.paddingInlineStart=40*r+"px");const i=this.getDirection();i&&(n.dir=i)}return{element:n}}exportJSON(){const e={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},n=this.getTextFormat(),r=this.getTextStyle();return n!==0&&(e.textFormat=n),r!==""&&(e.textStyle=r),e}updateFromJSON(e){return super.updateFromJSON(e).setFormat(e.format).setIndent(e.indent).setDirection(e.direction).setTextFormat(e.textFormat||0).setTextStyle(e.textStyle||"")}insertNewAfter(e,n){return null}canIndent(){return!0}collapseAtStart(e){return!1}excludeFromCopy(e){return!1}canReplaceWith(e){return!0}canInsertAfter(e){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(e){return!1}extractWithChild(e,n,r){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(e,n){const r=this.getDOMSlot(e);let i=r.getFirstChild();for(let o=this.getFirstChild();o;o=o.getNextSibling()){const a=n.getElementByKey(o.getKey());a!==null&&(i==null?(r.insertChild(a),i=a):i!==a&&r.replaceChild(a,i),i=i.nextSibling)}}}function we(t){return t instanceof ir}function HE(t,e,n){let r=t.getNode();for(;r;){const i=r.__key;if(e.has(i)&&!n.has(i))return!0;r=r.getParent()}return!1}class O0 extends ha{decorate(e,n){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function Gt(t){return t instanceof O0}class wd extends ir{__cachedText;static getType(){return"root"}static clone(){return new wd}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){Be(51)}getTextContent(){const e=this.__cachedText;return!Hh()&&Vn()._dirtyType!==0||e===null?super.getTextContent():e}remove(){Be(52)}replace(e){Be(53)}insertBefore(e){Be(54)}insertAfter(e){Be(55)}updateDOM(e,n){return!1}splice(e,n,r){for(const i of r)we(i)||Gt(i)||Be(282);return super.splice(e,n,r)}static importJSON(e){return ar().updateFromJSON(e)}collapseAtStart(){return!0}}function ur(t){return t instanceof wd}function dI(t){return new Kh(new Map(t._nodeMap))}function L0(){return new Kh(new Map([["root",new wd]]))}function fI(t){const e=t.exportJSON(),n=t.constructor;if(e.type!==n.getType()&&Be(130,n.name),we(t)){const r=e.children;Array.isArray(r)||Be(59,n.name);const i=t.getChildren();for(let o=0;o<i.length;o++){const a=fI(i[o]);r.push(a)}}return e}function XV(t){return t instanceof Kh}class Kh{_nodeMap;_selection;_flushSync;_readOnly;constructor(e,n){this._nodeMap=e,this._selection=n||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(e,n){return UE(n&&n.editor||null,this,e)}clone(e){const n=new Kh(this._nodeMap,e===void 0?this._selection:e);return n._readOnly=!0,n}toJSON(){return UE(null,this,()=>({root:fI(ar())}))}}class I0 extends ir{static getType(){return"artificial"}createDOM(e){return document.createElement("div")}}class xd extends ir{static getType(){return"paragraph"}static clone(e){return new xd(e.__key)}createDOM(e){const n=document.createElement("p"),r=su(e.theme,"paragraph");return r!==void 0&&n.classList.add(...r),n}updateDOM(e,n,r){return!1}static importDOM(){return{p:e=>({conversion:ZV,priority:0})}}exportDOM(e){const{element:n}=super.exportDOM(e);if(In(n)){this.isEmpty()&&n.append(document.createElement("br"));const r=this.getFormatType();r&&(n.style.textAlign=r)}return{element:n}}static importJSON(e){return Tn().updateFromJSON(e)}exportJSON(){return{...super.exportJSON(),textFormat:this.getTextFormat(),textStyle:this.getTextStyle()}}insertNewAfter(e,n){const r=Tn();r.setTextFormat(e.format),r.setTextStyle(e.style);const i=this.getDirection();return r.setDirection(i),r.setFormat(this.getFormatType()),r.setStyle(this.getStyle()),this.insertAfter(r,n),r}collapseAtStart(){const e=this.getChildren();if(e.length===0||Ye(e[0])&&e[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function ZV(t){const e=Tn();return t.style&&(e.setFormat(t.style.textAlign),q0(t,e)),{node:e}}function Tn(){return Di(new xd)}function Vh(t){return t instanceof xd}const jt=0,hs=1,cf=2,QV=4;function hI(t,e,n,r){const i=t._keyToDOMMap;i.clear(),t._editorState=L0(),t._pendingEditorState=r,t._compositionKey=null,t._dirtyType=0,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements.clear(),t._normalizedNodes=new Set,t._updateTags=new Set,t._updates=[],t._blockCursorElement=null;const o=t._observer;o!==null&&(o.disconnect(),t._observer=null),e!==null&&(e.textContent=""),n!==null&&(n.textContent="",i.set("root",n))}function e9(t){const e=new Set,n=new Set;let r=t;for(;r;){const{ownNodeConfig:i}=uv(r),o=r.transform;if(!n.has(o)){n.add(o);const a=r.transform();a&&e.add(a)}if(i){const a=i.$transform;a&&e.add(a),r=i.extends}else{const a=Object.getPrototypeOf(r);r=a.prototype instanceof ha&&a!==ha?a:void 0}}return e}function pI(t){const e=t||{},n=YV(),r=e.theme||{},i=t===void 0?n:e.parentEditor||null,o=e.disableEvents||!1,a=L0(),s=e.namespace||(i!==null?i._config.namespace:wI()),l=e.editorState,u=[wd,cs,_d,bd,xd,I0,...e.nodes||[]],{onError:d,html:f}=e,h=e.editable===void 0||e.editable;let p;if(t===void 0&&n!==null)p=n._nodes;else{p=new Map;for(let m=0;m<u.length;m++){let v=u[m],b=null,y=null;if(typeof v!="function"){const E=v;v=E.replace,b=E.with,y=E.withKlass||null}uv(v);const w=v.getType(),x=e9(v);p.set(w,{exportDOM:f&&f.export?f.export.get(v):void 0,klass:v,replace:b,replaceWithKlass:y,sharedNodeState:vV(u[m]),transforms:x})}}const g=new Du(a,i,p,{disableEvents:o,namespace:s,theme:r},d||console.error,(function(m,v){const b=new Map,y=new Set,w=x=>{Object.keys(x).forEach(E=>{let $=b.get(E);$===void 0&&($=[],b.set(E,$)),$.push(x[E])})};return m.forEach(x=>{const E=x.klass.importDOM;if(E==null||y.has(E))return;y.add(E);const $=E.call(x.klass);$!==null&&w($)}),v&&w(v),b})(p,f?f.import:void 0),h,t);return l!==void 0&&(g._pendingEditorState=l,g._dirtyType=2),g}class Du{static version;_headless;_parentEditor;_rootElement;_editorState;_pendingEditorState;_compositionKey;_deferred;_keyToDOMMap;_updates;_updating;_listeners;_commands;_nodes;_decorators;_pendingDecorators;_config;_dirtyType;_cloneNotNeeded;_dirtyLeaves;_dirtyElements;_normalizedNodes;_updateTags;_observer;_key;_onError;_htmlConversions;_window;_editable;_blockCursorElement;_createEditorArgs;constructor(e,n,r,i,o,a,s,l){this._createEditorArgs=l,this._parentEditor=n,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=i,this._nodes=r,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=wI(),this._onError=o,this._htmlConversions=a,this._editable=s,this._headless=n!==null&&n._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(e){const n=this._listeners.update;return n.add(e),()=>{n.delete(e)}}registerEditableListener(e){const n=this._listeners.editable;return n.add(e),()=>{n.delete(e)}}registerDecoratorListener(e){const n=this._listeners.decorator;return n.add(e),()=>{n.delete(e)}}registerTextContentListener(e){const n=this._listeners.textcontent;return n.add(e),()=>{n.delete(e)}}registerRootListener(e){const n=this._listeners.root;return e(this._rootElement,null),n.add(e),()=>{e(null,this._rootElement),n.delete(e)}}registerCommand(e,n,r){r===void 0&&Be(35);const i=this._commands;i.has(e)||i.set(e,[new Set,new Set,new Set,new Set,new Set]);const o=i.get(e);o===void 0&&Be(36,String(e));const a=o[r];return a.add(n),()=>{a.delete(n),o.every(s=>s.size===0)&&i.delete(e)}}registerMutationListener(e,n,r){const i=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,o=this._listeners.mutation;let a=o.get(n);a===void 0&&(a=new Set,o.set(n,a)),a.add(i);const s=r&&r.skipInitialization;return s!==void 0&&s||this.initializeMutationListener(n,i),()=>{a.delete(i),a.size===0&&o.delete(n)}}getRegisteredNode(e){const n=this._nodes.get(e.getType());return n===void 0&&Be(37,e.name),n}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,n){const r=this._editorState,i=QE(r).get(n.getType());if(!i)return;const o=new Map;for(const a of i.keys())o.set(a,"created");o.size>0&&e(o,{dirtyLeaves:new Set,prevEditorState:r,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(e,n){const r=this.getRegisteredNode(e);return r.transforms.add(n),r}registerNodeTransform(e,n){const r=this.registerNodeTransformToKlass(e,n),i=[r],o=r.replaceWithKlass;if(o!=null){const a=this.registerNodeTransformToKlass(o,n);i.push(a)}return(function(a,s){const l=QE(a.getEditorState()),u=[];for(const d of s){const f=l.get(d);f&&u.push(f)}u.length!==0&&a.update(()=>{for(const d of u)for(const f of d.keys()){const h=qn(f);h&&h.markDirty()}},a._pendingEditorState===null?{tag:$f}:void 0)})(this,i.map(a=>a.klass.getType())),()=>{i.forEach(a=>a.transforms.delete(n))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,n){return tt(this,e,n)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){const n=this._rootElement;if(e!==n){const r=su(this._config.theme,"root"),i=this._pendingEditorState||this._editorState;if(this._rootElement=e,hI(this,n,e,i),n!==null&&(this._config.disableEvents||OV(n),r!=null&&n.classList.remove(...r)),e!==null){const o=B0(e),a=e.style;a.userSelect="text",a.whiteSpace="pre-wrap",a.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=o,this._dirtyType=2,EL(this),this._updateTags.add($f),Fa(this),this._config.disableEvents||(function(s,l){const u=s.ownerDocument;Ry.set(s,u);const d=Ug.get(u)??0;d<1&&u.addEventListener("selectionchange",QL),Ug.set(u,d+1),s.__lexicalEditor=l;const f=ZL(s);for(let h=0;h<Ny.length;h++){const[p,g]=Ny[h],m=typeof g=="function"?v=>{EE(v)||(SE(v),(l.isEditable()||p==="click")&&g(v,l))}:v=>{if(EE(v))return;SE(v);const b=l.isEditable();switch(p){case"cut":return b&&tt(l,$0,v);case"copy":return tt(l,nv,v);case"paste":return b&&tt(l,k0,v);case"dragstart":return b&&tt(l,HL,v);case"dragover":return b&&tt(l,KL,v);case"dragend":return b&&tt(l,EV,v);case"focus":return b&&tt(l,AV,v);case"blur":return b&&tt(l,CV,v);case"drop":return b&&tt(l,qL,v)}};s.addEventListener(p,m),f.push(()=>{s.removeEventListener(p,m)})}})(e,this),r!=null&&e.classList.add(...r)}else this._window=null,this._updateTags.add($f),Fa(this);Af("root",this,!1,e,n)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,n){e.isEmpty()&&Be(38);let r=e;r._readOnly&&(r=dI(e),r._selection=e._selection?e._selection.clone():null),SL(this);const i=this._pendingEditorState,o=this._updateTags,a=n!==void 0?n.tag:null;i===null||i.isEmpty()||(a!=null&&o.add(a),Fa(this)),this._pendingEditorState=r,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,a!=null&&o.add(a),this._updating||Fa(this)}parseEditorState(e,n){return(function(r,i,o){const a=L0(),s=$r,l=Li,u=Ar,d=i._dirtyElements,f=i._dirtyLeaves,h=i._cloneNotNeeded,p=i._dirtyType;i._dirtyElements=new Map,i._dirtyLeaves=new Set,i._cloneNotNeeded=new Set,i._dirtyType=0,$r=a,Li=!1,Ar=i,N0(null);try{const g=i._nodes;P0(r.root,g),o&&o(),a._readOnly=!0}catch(g){g instanceof Error&&i._onError(g)}finally{i._dirtyElements=d,i._dirtyLeaves=f,i._cloneNotNeeded=h,i._dirtyType=p,$r=s,Li=l,Ar=u}return a})(typeof e=="string"?JSON.parse(e):e,this,n)}read(e){return Fa(this),this.getEditorState().read(e,{editor:this})}update(e,n){(function(r,i,o){r._updating?r._updates.push([i,o]):ov(r,i,o)})(this,e,n)}focus(e,n={}){const r=this._rootElement;r!==null&&(r.setAttribute("autocapitalize","off"),Ui(this,()=>{const i=Ge(),o=ar();i!==null?i.dirty||Br(i.clone()):o.getChildrenSize()!==0&&(n.defaultSelection==="rootStart"?o.selectStart():o.selectEnd()),l9("focus"),c9(()=>{r.removeAttribute("autocapitalize"),e&&e()})}),this._pendingEditorState===null&&r.removeAttribute("autocapitalize"))}blur(){const e=this._rootElement;e!==null&&e.blur();const n=Bo(this._window);n!==null&&n.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,Af("editable",this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}}Du.version="0.38.2+prod.esm";let By=null;function N0(t){By=t}let t9=1;function gI(t,e){const n=R0(t,e);return n===void 0&&Be(30,e),n}function R0(t,e){return t._nodes.get(e)}const n9=typeof queueMicrotask=="function"?queueMicrotask:t=>{Promise.resolve().then(t)};function KE(t){return Gt(Us(t))}function M0(t){const e=document.activeElement;if(!In(e))return!1;const n=e.nodeName;return Gt(Us(t))&&(n==="INPUT"||n==="TEXTAREA"||e.contentEditable==="true"&&sv(e)==null)}function Gh(t,e,n){const r=t.getRootElement();try{return r!==null&&r.contains(e)&&r.contains(n)&&e!==null&&!M0(e)&&av(e)===t}catch{return!1}}function D0(t){return t instanceof Du}function av(t){let e=t;for(;e!=null;){const n=sv(e);if(D0(n))return n;e=Wh(e)}return null}function sv(t){return t?t.__lexicalEditor:null}function r9(t){return oV.test(t)?"rtl":aV.test(t)?"ltr":null}function Al(t){return hi(t)||t.isToken()}function Ra(t){return Al(t)||t.isSegmented()}function us(t){return kd(t)&&t.nodeType===3}function mI(t){return kd(t)&&t.nodeType===9}function Fu(t){let e=t;for(;e!=null;){if(us(e))return e;e=e.firstChild}return null}function Kg(t,e,n){const r=Yl[e];if(n!==null&&(t&r)===(n&r))return t;let i=t^r;return e==="subscript"?i&=-65:e==="superscript"?i&=-33:e==="lowercase"?(i&=-513,i&=-1025):e==="uppercase"?(i&=-257,i&=-1025):e==="capitalize"&&(i&=-257,i&=-513),i}function i9(t){return Ye(t)||Bn(t)||Gt(t)}function o9(t,e){const n=(function(){const a=By;return By=null,a})();if((e=e||n&&n.__key)!=null)return void(t.__key=e);Tr(),lI();const r=Vn(),i=tl(),o=""+t9++;i._nodeMap.set(o,t),we(t)?r._dirtyElements.set(o,!0):r._dirtyLeaves.add(o),r._cloneNotNeeded.add(o),r._dirtyType=1,t.__key=o}function Cl(t){const e=t.getParent();if(e!==null){const n=t.getWritable(),r=e.getWritable(),i=t.getPreviousSibling(),o=t.getNextSibling(),a=o!==null?o.__key:null,s=i!==null?i.__key:null,l=i!==null?i.getWritable():null,u=o!==null?o.getWritable():null;i===null&&(r.__first=a),o===null&&(r.__last=s),l!==null&&(l.__next=a),u!==null&&(u.__prev=s),n.__prev=null,n.__next=null,n.__parent=null,r.__size--}}function Vg(t){lI(),Bg(t)&&Be(323,t.__key,t.__type);const e=t.getLatest(),n=e.__parent,r=tl(),i=Vn(),o=r._nodeMap,a=i._dirtyElements;n!==null&&(function(l,u,d){let f=l;for(;f!==null;){if(d.has(f))return;const h=u.get(f);if(h===void 0)break;d.set(f,!1),f=h.__parent}})(n,o,a);const s=e.__key;i._dirtyType=1,we(t)?a.set(s,!0):i._dirtyLeaves.add(s)}function Ir(t){Tr();const e=Vn(),n=e._compositionKey;if(t!==n){if(e._compositionKey=t,n!==null){const r=qn(n);r!==null&&r.getWritable()}if(t!==null){const r=qn(t);r!==null&&r.getWritable()}}}function ks(){return Hh()?null:Vn()._compositionKey}function qn(t,e){const n=(e||tl())._nodeMap.get(t);return n===void 0?null:n}function vI(t,e){const n=lv(t,Vn());return n!==void 0?qn(n,e):null}function lv(t,e){return t[`__lexicalKey_${e._key}`]}function Us(t,e){let n=t;for(;n!=null;){const r=vI(n,e);if(r!==null)return r;n=Wh(n)}return null}function _I(t){const e=t._decorators,n=Object.assign({},e);return t._pendingDecorators=n,n}function VE(t){return t.read(()=>ar().getTextContent())}function ar(){return bI(tl())}function bI(t){return t._nodeMap.get("root")}function Br(t){Tr();const e=tl();t!==null&&(t.dirty=!0,t.setCachedNodes(null)),e._selection=t}function Qc(t){const e=Vn(),n=(function(r,i){let o=r;for(;o!=null;){const a=lv(o,i);if(a!==void 0)return a;o=Wh(o)}return null})(t,e);return n===null?t===e.getRootElement()?qn("root"):null:qn(n)}function yI(t){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(t)}function F0(t){const e=[];let n=t;for(;n!==null;)e.push(n),n=n._parentEditor;return e}function wI(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function xI(t){return us(t)?t.nodeValue:null}function z0(t,e,n){const r=Bo(bo(e));if(r===null)return;const i=r.anchorNode;let{anchorOffset:o,focusOffset:a}=r;if(i!==null){let s=xI(i);const l=Us(i);if(s!==null&&Ye(l)){if(s===ev&&n){const u=n.length;s=n,o=u,a=u}s!==null&&j0(l,s,o,a,t)}}}function j0(t,e,n,r,i){let o=t;if(o.isAttached()&&(i||!o.isDirty())){const a=o.isComposing();let s=e;(a||i)&&e[e.length-1]===ev&&(s=e.slice(0,-1));const l=o.getTextContent();if(i||s!==l){if(s===""){if(Ir(null),th||Nu||nh)o.remove();else{const m=Vn();setTimeout(()=>{m.update(()=>{o.isAttached()&&o.remove()})},20)}return}const u=o.getParent(),d=wc(),f=o.getTextContentSize(),h=ks(),p=o.getKey();if(o.isToken()||h!==null&&p===h&&!a||De(d)&&(u!==null&&!u.canInsertTextBefore()&&d.anchor.offset===0||d.anchor.key===t.__key&&d.anchor.offset===0&&!o.canInsertTextBefore()&&!a||d.focus.key===t.__key&&d.focus.offset===f&&!o.canInsertTextAfter()&&!a))return void o.markDirty();const g=Ge();if(!De(g)||n===null||r===null)return void GE(o,s,g);if(g.setTextNodeRange(o,n,o,r),o.isSegmented()){const m=zn(o.getTextContent());o.replace(m),o=m}GE(o,s,g)}}}function GE(t,e,n){if(t.setTextContent(e),De(n)){const r=t.getKey();for(const i of["anchor","focus"]){const o=n[i];o.type==="text"&&o.key===r&&(o.offset=Is(t,o.offset,"clamp"))}}}function Pp(t,e,n){const r=e[n]||!1;return r==="any"||r===t[n]}function a9(t,e){return Pp(t,e,"altKey")&&Pp(t,e,"ctrlKey")&&Pp(t,e,"shiftKey")&&Pp(t,e,"metaKey")}function an(t,e,n){return a9(t,n)&&t.key.toLowerCase()===e.toLowerCase()}const Ia={ctrlKey:!$o,metaKey:$o},WE={altKey:$o,ctrlKey:!$o};function YE(t){return t.key==="Backspace"}function JE(t){return an(t,"a",Ia)}function s9(t){const e=ar();if(De(t)){const n=t.anchor,r=t.focus,i=n.getNode().getTopLevelElementOrThrow().getParentOrThrow();return n.set(i.getKey(),0,"element"),r.set(i.getKey(),i.getChildrenSize(),"element"),Ru(t),t}{const n=e.select(0,e.getChildrenSize());return Br(Ru(n)),n}}function su(t,e){t.__lexicalClassNameCache===void 0&&(t.__lexicalClassNameCache={});const n=t.__lexicalClassNameCache,r=n[e];if(r!==void 0)return r;const i=t[e];if(typeof i=="string"){const o=_L(i);return n[e]=o,o}return i}function U0(t,e,n,r,i){if(n.size===0)return;const o=r.__type,a=r.__key,s=e.get(o);s===void 0&&Be(33,o);const l=s.klass;let u=t.get(l);u===void 0&&(u=new Map,t.set(l,u));const d=u.get(a),f=d==="destroyed"&&i==="created";(d===void 0||f)&&u.set(a,f?"updated":i)}function XE(t,e,n){const r=t.getParent();let i=n,o=t;return r!==null&&(e&&n===0?(i=o.getIndexWithinParent(),o=r):e||n!==o.getChildrenSize()||(i=o.getIndexWithinParent()+1,o=r)),o.getChildAtIndex(e?i-1:i)}function qy(t,e){const n=t.offset;if(t.type==="element")return XE(t.getNode(),e,n);{const r=t.getNode();if(e&&n===0||!e&&n===r.getTextContentSize()){const i=e?r.getPreviousSibling():r.getNextSibling();return i===null?XE(r.getParentOrThrow(),e,r.getIndexWithinParent()+(e?0:1)):i}}return null}function kI(t){const e=bo(t).event,n=e&&e.inputType;return n==="insertFromPaste"||n==="insertFromPasteAsQuotation"}function tt(t,e,n){return(function(r,i,o){const a=F0(r);for(let s=4;s>=0;s--)for(let l=0;l<a.length;l++){const u=a[l],d=u._commands.get(i);if(d!==void 0){const f=d[s];if(f!==void 0){const h=Array.from(f),p=h.length;let g=!1;if(Ui(u,()=>{for(let m=0;m<p;m++)if(h[m](o,r))return void(g=!0)}),g)return g}}}return!1})(t,e,n)}function cv(t){return!ur(t)&&!t.isLastChild()&&!t.isInline()}function Zl(t,e){const n=t._keyToDOMMap.get(e);return n===void 0&&Be(75,e),n}function Wh(t){const e=t.assignedSlot||t.parentElement;return Vy(e)?e.host:e}function SI(t){return mI(t)?t:In(t)?t.ownerDocument:null}function l9(t){Tr(),Vn()._updateTags.add(t)}function c9(t){Tr(),Vn()._deferred.push(t)}function Hy(t,e){let n=t.getParent();for(;n!==null;){if(n.is(e))return!0;n=n.getParent()}return!1}function B0(t){const e=SI(t);return e?e.defaultView:null}function bo(t){const e=t._window;return e===null&&Be(78),e}function u9(t){return we(t)&&t.isInline()||Gt(t)&&t.isInline()}function d9(t){let e=t.getParentOrThrow();for(;e!==null;){if(Yi(e))return e;e=e.getParentOrThrow()}return e}function Yi(t){return ur(t)||we(t)&&t.isShadowRoot()}function Di(t){const e=Vn(),n=t.getType(),r=R0(e,n);r===void 0&&Be(200,t.constructor.name,n);const{replace:i,replaceWithKlass:o}=r;if(i!==null){const a=i(t),s=a.constructor;return o!==null?a instanceof o||Be(201,o.name,o.getType(),s.name,s.getType(),t.constructor.name,n):a instanceof t.constructor&&s!==t.constructor||Be(202,s.name,s.getType(),t.constructor.name,n),a.__key===t.__key&&Be(203,t.constructor.name,n,s.name,s.getType()),a}return t}function $_(t,e){!ur(t.getParent())||we(e)||Gt(e)||Be(99)}function f9(t){const e=qn(t);return e===null&&Be(63,t),e}function A_(t){return(Gt(t)||we(t)&&!t.canBeEmpty())&&!t.isInline()}function Ky(t,e,n){n.style.removeProperty("caret-color"),e._blockCursorElement=null;const r=t.parentElement;r!==null&&r.removeChild(t)}function Bo(t){return Wo?(t||window).getSelection():null}function h9(t){const e=B0(t);return e?e.getSelection():null}function EI(t){return In(t)&&t.tagName==="A"}function In(t){return kd(t)&&t.nodeType===1}function kd(t){return typeof t=="object"&&t!==null&&"nodeType"in t&&typeof t.nodeType=="number"}function Vy(t){return kd(t)&&t.nodeType===11}function Gy(t){const e=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return t.nodeName.match(e)!==null}function Gg(t){const e=new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,"i");return t.nodeName.match(e)!==null}function fo(t){if(Gt(t)&&!t.isInline())return!0;if(!we(t)||Yi(t))return!1;const e=t.getFirstChild(),n=e===null||Bn(e)||Ye(e)||e.isInline();return!t.isInline()&&t.canBeEmpty()!==!1&&n}function Yh(){return Vn()}const ZE=new WeakMap,p9=new Map;function QE(t){if(!t._readOnly&&t.isEmpty())return p9;t._readOnly||Be(192);let e=ZE.get(t);return e||(e=(function(n){const r=new Map;for(const[i,o]of n._nodeMap){const a=o.__type;let s=r.get(a);s||(s=new Map,r.set(a,s)),s.set(i,o)}return r})(t),ZE.set(t,e)),e}function TI(t){const e=t.constructor.clone(t);return e.afterCloneFrom(t),e}function g9(t){return(e=TI(t))[eI]=!0,e;var e}function q0(t,e){const n=parseInt(t.style.paddingInlineStart,10)||0,r=Math.round(n/40);e.setIndent(r)}function m9(t){t.__lexicalUnmanaged=!0}function v9(t){return t.__lexicalUnmanaged===!0}function qd(t,e){return(function(n,r){return Object.prototype.hasOwnProperty.call(n,r)})(t,e)&&t[e]!==ha[e]}function uv(t){const e=fE in t.prototype?t.prototype[fE]():void 0,n=(function(a){if(!(a===ha||a.prototype instanceof ha)){let s="<unknown>",l="<unknown>";try{s=a.getType()}catch{}try{Du.version&&(l=JSON.parse(Du.version))}catch{}Be(290,a.name,s,l)}return a===O0||a===ir||a===ha})(t),r=!n&&qd(t,"getType")?t.getType():void 0;let i,o=r;if(e)if(r)i=e[r];else for(const[a,s]of Object.entries(e))o=a,i=s;if(!n&&o&&(qd(t,"getType")||(t.getType=()=>o),qd(t,"clone")||(t.clone=a=>(N0(a),new t)),qd(t,"importJSON")||(t.importJSON=i&&i.$importJSON||(a=>new t().updateFromJSON(a))),!qd(t,"importDOM")&&i)){const{importDOM:a}=i;a&&(t.importDOM=()=>a)}return{ownNodeConfig:i,ownNodeType:o}}function _9(t){const e=Yh();return Tr(),new(e.resolveRegisteredNodeAfterReplacements(e.getRegisteredNode(t))).klass}const pi=(t,e)=>{let n=t;for(;n!=null&&!ur(n);){if(e(n))return n;n=n.getParent()}return null},b9={next:"previous",previous:"next"};class H0{origin;constructor(e){this.origin=e}[Symbol.iterator](){return Y0({hasNext:tc,initial:this.getAdjacentCaret(),map:e=>e,step:e=>e.getAdjacentCaret()})}getAdjacentCaret(){return Cr(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return Cr(this.origin,this.direction)}remove(){const e=this.getNodeAtCaret();return e&&e.remove(),this}replaceOrInsert(e,n){const r=this.getNodeAtCaret();return e.is(this.origin)||e.is(r)||(r===null?this.insert(e):r.replace(e,n)),this}splice(e,n,r="next"){const i=r===this.direction?n:Array.from(n).reverse();let o=this;const a=this.getParentAtCaret(),s=new Map;for(let l=o.getAdjacentCaret();l!==null&&s.size<e;l=l.getAdjacentCaret()){const u=l.origin.getWritable();s.set(u.getKey(),u)}for(const l of i){if(s.size>0){const u=o.getNodeAtCaret();if(u){if(s.delete(u.getKey()),s.delete(l.getKey()),!(u.is(l)||o.origin.is(l))){const d=l.getParent();d&&d.is(a)&&l.remove(),u.replace(l)}}else u===null&&Be(263,Array.from(s).join(" "))}else o.insert(l);o=Cr(l,this.direction)}for(const l of s.values())l.remove();return this}}class lh extends H0{type="child";getLatest(){const e=this.origin.getLatest();return e===this.origin?this:ya(e,this.direction)}getParentCaret(e="root"){return Cr(K0(this.getParentAtCaret(),e),this.direction)}getFlipped(){const e=Sd(this.direction);return Cr(this.getNodeAtCaret(),e)||ya(this.origin,e)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(e){return e instanceof lh&&this.direction===e.direction&&this.origin.is(e.origin)}isSamePointCaret(e){return this.isSameNodeCaret(e)}}const y9={root:ur,shadowRoot:Yi};function Sd(t){return b9[t]}function K0(t,e="root"){return y9[e](t)?null:t}class Ql extends H0{type="sibling";getLatest(){const e=this.origin.getLatest();return e===this.origin?this:Cr(e,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return we(this.origin)?ya(this.origin,this.direction):null}getParentCaret(e="root"){return Cr(K0(this.getParentAtCaret(),e),this.direction)}getFlipped(){const e=Sd(this.direction);return Cr(this.getNodeAtCaret(),e)||ya(this.origin.getParentOrThrow(),e)}isSamePointCaret(e){return e instanceof Ql&&this.direction===e.direction&&this.origin.is(e.origin)}isSameNodeCaret(e){return(e instanceof Ql||e instanceof ec)&&this.direction===e.direction&&this.origin.is(e.origin)}}class ec extends H0{type="text";offset;constructor(e,n){super(e),this.offset=n}getLatest(){const e=this.origin.getLatest();return e===this.origin?this:Bs(e,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(e="root"){return Cr(K0(this.getParentAtCaret(),e),this.direction)}getFlipped(){return Bs(this.origin,Sd(this.direction),this.offset)}isSamePointCaret(e){return e instanceof ec&&this.direction===e.direction&&this.origin.is(e.origin)&&this.offset===e.offset}isSameNodeCaret(e){return(e instanceof Ql||e instanceof ec)&&this.direction===e.direction&&this.origin.is(e.origin)}getSiblingCaret(){return Cr(this.origin,this.direction)}}function Ls(t){return t instanceof ec}function tc(t){return t instanceof Ql}function pa(t){return t instanceof lh}const w9={next:class extends ec{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(t){return this.origin.insertAfter(t),this}},previous:class extends ec{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(t){return this.origin.insertBefore(t),this}}},x9={next:class extends Ql{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(t){return this.origin.insertAfter(t),this}},previous:class extends Ql{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(t){return this.origin.insertBefore(t),this}}},k9={next:class extends lh{direction="next";getNodeAtCaret(){return this.origin.getFirstChild()}insert(t){return this.origin.splice(0,0,[t]),this}},previous:class extends lh{direction="previous";getNodeAtCaret(){return this.origin.getLastChild()}insert(t){return this.origin.splice(this.origin.getChildrenSize(),0,[t]),this}}};function Cr(t,e){return t?new x9[e](t):null}function Bs(t,e,n){return t?new w9[e](t,Is(t,n)):null}function Is(t,e,n="error"){const r=t.getTextContentSize();let i=e==="next"?r:e==="previous"?0:e;return(i<0||i>r)&&(n!=="clamp"&&mL(284,String(e),String(r),t.getKey()),i=i<0?0:r),i}function eT(t,e){return new E9(t,e)}function ya(t,e){return we(t)?new k9[e](t):null}function S9(t){return t&&t.getChildCaret()||t}function V0(t){return t&&S9(t.getAdjacentCaret())}class G0{type="node-caret-range";direction;anchor;focus;constructor(e,n,r){this.anchor=e,this.focus=n,this.direction=r}getLatest(){const e=this.anchor.getLatest(),n=this.focus.getLatest();return e===this.anchor&&n===this.focus?this:new G0(e,n,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const e=i=>{const o=this[i].getLatest();return Ls(o)?(function(a,s){const{direction:l,origin:u}=a,d=Is(u,s==="focus"?Sd(l):l);return eT(a,d-a.offset)})(o,i):null},n=e("anchor"),r=e("focus");if(n&&r){const{caret:i}=n,{caret:o}=r;if(i.isSameNodeCaret(o))return[eT(i,o.offset-i.offset),null]}return[n,r]}iterNodeCarets(e="root"){const n=Ls(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),r=this.focus.getLatest(),i=Ls(r),o=a=>a.isSameNodeCaret(r)?null:V0(a)||a.getParentCaret(e);return Y0({hasNext:a=>a!==null&&!(i&&r.isSameNodeCaret(a)),initial:n.isSameNodeCaret(r)?null:o(n),map:a=>a,step:o})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class E9{type="slice";caret;distance;constructor(e,n){this.caret=e,this.distance=n}getSliceIndices(){const{distance:e,caret:{offset:n}}=this,r=n+e;return r<n?[r,n]:[n,r]}getTextContent(){const[e,n]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(e,n)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){const{caret:{origin:e,direction:n}}=this,[r,i]=this.getSliceIndices(),o=e.getTextContent();return Bs(e.setTextContent(o.slice(0,r)+o.slice(i)),n,r)}}function W0(t){return Qa(t,Cr(ar(),t.direction))}function T9(t){return Qa(t,t)}function Qa(t,e){return t.direction!==e.direction&&Be(265),new G0(t,e,t.direction)}function Y0(t){const{initial:e,hasNext:n,step:r,map:i}=t;let o=e;return{[Symbol.iterator](){return this},next(){if(!n(o))return{done:!0,value:void 0};const a={done:!1,value:i(o)};return o=r(o),a}}}function $I(t,e){const n=rg(t.origin,e.origin);switch(n===null&&Be(275,t.origin.getKey(),e.origin.getKey()),n.type){case"same":{const r=t.type==="text",i=e.type==="text";return r&&i?(function(o,a){return Math.sign(o-a)})(t.offset,e.offset):t.type===e.type?0:r?-1:i?1:t.type==="child"?-1:1}case"ancestor":return t.type==="child"?-1:1;case"descendant":return e.type==="child"?1:-1;case"branch":return AI(n)}}function AI(t){const{a:e,b:n}=t,r=e.__key,i=n.__key;let o=e,a=n;for(;o&&a;o=o.getNextSibling(),a=a.getNextSibling()){if(o.__key===i)return-1;if(a.__key===r)return 1}return o===null?1:-1}function Op(t,e){return e.is(t)}function tT(t){return we(t)?[t.getLatest(),null]:[t.getParent(),t.getLatest()]}function rg(t,e){if(t.is(e))return{commonAncestor:t,type:"same"};const n=new Map;for(let[r,i]=tT(t);r;i=r,r=r.getParent())n.set(r,i);for(let[r,i]=tT(e);r;i=r,r=r.getParent()){const o=n.get(r);if(o!==void 0)return o===null?(Op(t,r)||Be(276),{commonAncestor:r,type:"ancestor"}):i===null?(Op(e,r)||Be(277),{commonAncestor:r,type:"descendant"}):((we(o)||Op(t,o))&&(we(i)||Op(e,i))&&r.is(o.getParent())&&r.is(i.getParent())||Be(278),{a:o,b:i,commonAncestor:r,type:"branch"})}return null}function es(t,e){const{type:n,key:r,offset:i}=t,o=f9(t.key);return n==="text"?(Ye(o)||Be(266,o.getType(),r),Bs(o,e,i)):(we(o)||Be(267,o.getType(),r),A9(o,t.offset,e))}function ch(t,e){const{origin:n,direction:r}=e,i=r==="next";Ls(e)?t.set(n.getKey(),e.offset,"text"):tc(e)?Ye(n)?t.set(n.getKey(),Is(n,r),"text"):t.set(n.getParentOrThrow().getKey(),n.getIndexWithinParent()+(i?1:0),"element"):(pa(e)&&we(n)||Be(268),t.set(n.getKey(),i?0:n.getChildrenSize(),"element"))}function CI(t){const e=Ge(),n=De(e)?e:iv();return ig(n,t),Br(n),n}function ig(t,e){ch(t.anchor,e.anchor),ch(t.focus,e.focus)}function nT(t){const{anchor:e,focus:n}=t,r=es(e,"next"),i=es(n,"next"),o=$I(r,i)<=0?"next":"previous";return Qa(zu(r,o),zu(i,o))}function J0(t){const{direction:e,origin:n}=t,r=Cr(n,Sd(e)).getNodeAtCaret();return r?Cr(r,e):ya(n.getParentOrThrow(),e)}function rT(t,e="root"){const n=[t];for(let r=pa(t)?t.getParentCaret(e):t.getSiblingCaret();r!==null;r=r.getParentCaret(e))n.push(J0(r));return n}function C_(t){return!!t&&t.origin.isAttached()}function $9(t,e="removeEmptySlices"){if(t.isCollapsed())return t;const n="root",r="next";let i=e;const o=X0(t,r),a=rT(o.anchor,n),s=rT(o.focus.getFlipped(),n),l=new Set,u=[];for(const g of o.iterNodeCarets(n))if(pa(g))l.add(g.origin.getKey());else if(tc(g)){const{origin:m}=g;we(m)&&!l.has(m.getKey())||u.push(m)}for(const g of u)g.remove();for(const g of o.getTextSlices()){if(!g)continue;const{origin:m}=g.caret,v=m.getTextContentSize(),b=J0(Cr(m,r)),y=m.getMode();if(Math.abs(g.distance)===v&&i==="removeEmptySlices"||y==="token"&&g.distance!==0)b.remove();else if(g.distance!==0){i="removeEmptySlices";let w=g.removeTextSlice();const x=g.caret.origin;if(y==="segmented"){const E=w.origin,$=zn(E.getTextContent()).setStyle(E.getStyle()).setFormat(E.getFormat());b.replaceOrInsert($),w=Bs($,r,w.offset)}x.is(a[0].origin)&&(a[0]=w),x.is(s[0].origin)&&(s[0]=w.getFlipped())}}let d,f;for(const g of a)if(C_(g)){d=Lo(g);break}for(const g of s)if(C_(g)){f=Lo(g);break}const h=(function(g,m,v){if(!g||!m)return null;const b=g.getParentAtCaret(),y=m.getParentAtCaret();if(!b||!y)return null;const w=b.getParents().reverse();w.push(b);const x=y.getParents().reverse();x.push(y);const E=Math.min(w.length,x.length);let $;for($=0;$<E&&w[$]===x[$];$++);const A=(C,P)=>{let O;for(let I=$;I<C.length;I++){const L=C[I];if(Yi(L))return;!O&&P(L)&&(O=L)}return O},k=A(w,fo),T=k&&A(x,C=>v.has(C.getKey())&&fo(C));return k&&T?[k,T]:null})(d,f,l);if(h){const[g,m]=h;ya(g,"previous").splice(0,m.getChildren()),m.remove()}const p=[d,f,...a,...s].find(C_);if(p)return T9(zu(Lo(p),t.direction));Be(269,JSON.stringify(a.map(g=>g.origin.__key)))}function Lo(t){const e=(function(i){let o=i;for(;pa(o);){const a=V0(o);if(!pa(a))break;o=a}return o})(t.getLatest()),{direction:n}=e;if(Ye(e.origin))return Ls(e)?e:Bs(e.origin,n,n);const r=e.getAdjacentCaret();return tc(r)&&Ye(r.origin)?Bs(r.origin,n,Sd(n)):e}function PI(t){return Ls(t)&&t.offset!==Is(t.origin,t.direction)}function zu(t,e){return t.direction===e?t:t.getFlipped()}function X0(t,e){return t.direction===e?t:Qa(zu(t.focus,e),zu(t.anchor,e))}function A9(t,e,n){let r=ya(t,"next");for(let i=0;i<e;i++){const o=r.getAdjacentCaret();if(o===null)break;r=o}return zu(r,n)}function C9(...t){return t}function P9(t,e){if(!e||t===e)return t;for(const n in e)if(t[n]!==e[n])return{...t,...e};return t}const Wy=new Map;function OI(t){const e={};if(!t)return e;const n=t.split(";");for(const r of n)if(r!==""){const[i,o]=r.split(/:([^]+)/);i&&o&&(e[i.trim()]=o.trim())}return e}function iT(t){let e=Wy.get(t);return e===void 0&&(e=OI(t),Wy.set(t,e)),e}function LI(t){const e=Yh().getElementByKey(t.getKey());if(e===null)return null;const n=e.ownerDocument.defaultView;return n===null?null:n.getComputedStyle(e)}function II(t){return LI(ur(t)?t:t.getParentOrThrow())}function oT(t){const e=II(t);return e!==null&&e.direction==="rtl"}function NI(t,e,n="self"){const r=t.getStartEndPoints();if(e.isSelected(t)&&!Ra(e)&&r!==null){const[i,o]=r,a=t.isBackward(),s=i.getNode(),l=o.getNode(),u=e.is(s),d=e.is(l);if(u||d){const[f,h]=jy(t),p=s.is(l),g=e.is(a?l:s),m=e.is(a?s:l);let v,b=0;p?(b=f>h?h:f,v=f>h?f:h):g?(b=a?h:f,v=void 0):m&&(b=0,v=a?f:h);const y=e.__text.slice(b,v);y!==e.__text&&(n==="clone"&&(e=g9(e)),e.__text=y)}}return e}function O9(t){const e=t.getStyle(),n=OI(e);Wy.set(e,n)}function L9(t,e){const n=t.getFormatType(),r=t.getIndent();n!==e.getFormatType()&&e.setFormat(n),r!==e.getIndent()&&e.setIndent(r)}function Lp(t,e,n=L9){if(t===null)return;const r=t.getStartEndPoints(),i=new Map;let o=null;if(r){const[a,s]=r;o=iv(),o.anchor.set(a.key,a.offset,a.type),o.focus.set(s.key,s.offset,s.type);const l=pi(a.getNode(),fo),u=pi(s.getNode(),fo);we(l)&&i.set(l.getKey(),l),we(u)&&i.set(u.getKey(),u)}for(const a of t.getNodes())if(we(a)&&fo(a))i.set(a.getKey(),a);else if(r===null){const s=pi(a,fo);we(s)&&i.set(s.getKey(),s)}for(const[a,s]of i){const l=e();n(s,l),s.replace(l,!0),o&&(a===o.anchor.key&&o.anchor.set(l.getKey(),o.anchor.offset,o.anchor.type),a===o.focus.key&&o.focus.set(l.getKey(),o.focus.offset,o.focus.type))}o&&t.is(Ge())&&Br(o)}function RI(t){const e=MI(t);return e!==null&&e.writingMode==="vertical-rl"}function MI(t){const e=t.anchor.getNode();return we(e)?LI(e):II(e)}function aT(t,e){let n=RI(t)?!e:e;DI(t)&&(n=!n);const r=es(t.focus,n?"previous":"next");if(PI(r))return!1;for(const i of W0(r)){if(pa(i))return!i.origin.isInline();if(!we(i.origin)){if(Gt(i.origin))return!0;break}}return!1}function I9(t,e,n,r){t.modify(e?"extend":"move",n,r)}function DI(t){const e=MI(t);return e!==null&&e.direction==="rtl"}function sT(t,e,n){const r=DI(t);let i;i=RI(t)||r?!n:n,I9(t,e,i,"character")}function N9(t,...e){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",t);for(const i of e)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const FI=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,R9=FI&&"documentMode"in document?document.documentMode:null;!(!FI||!("InputEvent"in window)||R9)&&"getTargetRanges"in new window.InputEvent("input");function zI(...t){const e=[];for(const n of t)if(n&&typeof n=="string")for(const[r]of n.matchAll(/\S+/g))e.push(r);return e}function uh(...t){return()=>{for(let e=t.length-1;e>=0;e--)t[e]();t.length=0}}function Rr(t,...e){const n=zI(...e);n.length>0&&t.classList.add(...n)}function Pl(t,...e){const n=zI(...e);n.length>0&&t.classList.remove(...n)}function M9(t){return t?t.getAdjacentCaret():null}function Pf(t,e){let n=t;for(;n!=null;){if(n instanceof e)return n;n=n.getParent()}return null}function D9(t){const e=pi(t,n=>we(n)&&!n.isInline());return we(e)||N9(4,t.__key),e}function bl(t,e){return t!==null&&Object.getPrototypeOf(t).constructor.name===e.name}function jI(t,e){const n=[],r=Array.from(t).reverse();for(let i=r.pop();i!==void 0;i=r.pop())if(e(i))n.push(i);else if(we(i))for(const o of F9(i))r.push(o);return n}function F9(t){return z9(ya(t,"previous"))}function z9(t){return Y0({hasNext:tc,initial:t.getAdjacentCaret(),map:e=>e.origin.getLatest(),step:e=>e.getAdjacentCaret()})}var P_={exports:{}},lT;function j9(){return lT||(lT=1,(function(t){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};var n=(function(r){var i=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,o=0,a={},s={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function y(w){return w instanceof l?new l(w.type,y(w.content),w.alias):Array.isArray(w)?w.map(y):w.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(y){return Object.prototype.toString.call(y).slice(8,-1)},objId:function(y){return y.__id||Object.defineProperty(y,"__id",{value:++o}),y.__id},clone:function y(w,x){x=x||{};var E,$;switch(s.util.type(w)){case"Object":if($=s.util.objId(w),x[$])return x[$];E={},x[$]=E;for(var A in w)w.hasOwnProperty(A)&&(E[A]=y(w[A],x));return E;case"Array":return $=s.util.objId(w),x[$]?x[$]:(E=[],x[$]=E,w.forEach(function(k,T){E[T]=y(k,x)}),E);default:return w}},getLanguage:function(y){for(;y;){var w=i.exec(y.className);if(w)return w[1].toLowerCase();y=y.parentElement}return"none"},setLanguage:function(y,w){y.className=y.className.replace(RegExp(i,"gi"),""),y.classList.add("language-"+w)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(E){var y=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(E.stack)||[])[1];if(y){var w=document.getElementsByTagName("script");for(var x in w)if(w[x].src==y)return w[x]}return null}},isActive:function(y,w,x){for(var E="no-"+w;y;){var $=y.classList;if($.contains(w))return!0;if($.contains(E))return!1;y=y.parentElement}return!!x}},languages:{plain:a,plaintext:a,text:a,txt:a,extend:function(y,w){var x=s.util.clone(s.languages[y]);for(var E in w)x[E]=w[E];return x},insertBefore:function(y,w,x,E){E=E||s.languages;var $=E[y],A={};for(var k in $)if($.hasOwnProperty(k)){if(k==w)for(var T in x)x.hasOwnProperty(T)&&(A[T]=x[T]);x.hasOwnProperty(k)||(A[k]=$[k])}var C=E[y];return E[y]=A,s.languages.DFS(s.languages,function(P,O){O===C&&P!=y&&(this[P]=A)}),A},DFS:function y(w,x,E,$){$=$||{};var A=s.util.objId;for(var k in w)if(w.hasOwnProperty(k)){x.call(w,k,w[k],E||k);var T=w[k],C=s.util.type(T);C==="Object"&&!$[A(T)]?($[A(T)]=!0,y(T,x,null,$)):C==="Array"&&!$[A(T)]&&($[A(T)]=!0,y(T,x,k,$))}}},plugins:{},highlightAll:function(y,w){s.highlightAllUnder(document,y,w)},highlightAllUnder:function(y,w,x){var E={callback:x,container:y,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};s.hooks.run("before-highlightall",E),E.elements=Array.prototype.slice.apply(E.container.querySelectorAll(E.selector)),s.hooks.run("before-all-elements-highlight",E);for(var $=0,A;A=E.elements[$++];)s.highlightElement(A,w===!0,E.callback)},highlightElement:function(y,w,x){var E=s.util.getLanguage(y),$=s.languages[E];s.util.setLanguage(y,E);var A=y.parentElement;A&&A.nodeName.toLowerCase()==="pre"&&s.util.setLanguage(A,E);var k=y.textContent,T={element:y,language:E,grammar:$,code:k};function C(O){T.highlightedCode=O,s.hooks.run("before-insert",T),T.element.innerHTML=T.highlightedCode,s.hooks.run("after-highlight",T),s.hooks.run("complete",T),x&&x.call(T.element)}if(s.hooks.run("before-sanity-check",T),A=T.element.parentElement,A&&A.nodeName.toLowerCase()==="pre"&&!A.hasAttribute("tabindex")&&A.setAttribute("tabindex","0"),!T.code){s.hooks.run("complete",T),x&&x.call(T.element);return}if(s.hooks.run("before-highlight",T),!T.grammar){C(s.util.encode(T.code));return}if(w&&r.Worker){var P=new Worker(s.filename);P.onmessage=function(O){C(O.data)},P.postMessage(JSON.stringify({language:T.language,code:T.code,immediateClose:!0}))}else C(s.highlight(T.code,T.grammar,T.language))},highlight:function(y,w,x){var E={code:y,grammar:w,language:x};if(s.hooks.run("before-tokenize",E),!E.grammar)throw new Error('The language "'+E.language+'" has no grammar.');return E.tokens=s.tokenize(E.code,E.grammar),s.hooks.run("after-tokenize",E),l.stringify(s.util.encode(E.tokens),E.language)},tokenize:function(y,w){var x=w.rest;if(x){for(var E in x)w[E]=x[E];delete w.rest}var $=new f;return h($,$.head,y),d(y,$,w,$.head,0),g($)},hooks:{all:{},add:function(y,w){var x=s.hooks.all;x[y]=x[y]||[],x[y].push(w)},run:function(y,w){var x=s.hooks.all[y];if(!(!x||!x.length))for(var E=0,$;$=x[E++];)$(w)}},Token:l};r.Prism=s;function l(y,w,x,E){this.type=y,this.content=w,this.alias=x,this.length=(E||"").length|0}l.stringify=function y(w,x){if(typeof w=="string")return w;if(Array.isArray(w)){var E="";return w.forEach(function(C){E+=y(C,x)}),E}var $={type:w.type,content:y(w.content,x),tag:"span",classes:["token",w.type],attributes:{},language:x},A=w.alias;A&&(Array.isArray(A)?Array.prototype.push.apply($.classes,A):$.classes.push(A)),s.hooks.run("wrap",$);var k="";for(var T in $.attributes)k+=" "+T+'="'+($.attributes[T]||"").replace(/"/g,""")+'"';return"<"+$.tag+' class="'+$.classes.join(" ")+'"'+k+">"+$.content+"</"+$.tag+">"};function u(y,w,x,E){y.lastIndex=w;var $=y.exec(x);if($&&E&&$[1]){var A=$[1].length;$.index+=A,$[0]=$[0].slice(A)}return $}function d(y,w,x,E,$,A){for(var k in x)if(!(!x.hasOwnProperty(k)||!x[k])){var T=x[k];T=Array.isArray(T)?T:[T];for(var C=0;C<T.length;++C){if(A&&A.cause==k+","+C)return;var P=T[C],O=P.inside,I=!!P.lookbehind,L=!!P.greedy,D=P.alias;if(L&&!P.pattern.global){var B=P.pattern.toString().match(/[imsuy]*$/)[0];P.pattern=RegExp(P.pattern.source,B+"g")}for(var K=P.pattern||P,G=E.next,W=$;G!==w.tail&&!(A&&W>=A.reach);W+=G.value.length,G=G.next){var Y=G.value;if(w.length>y.length)return;if(!(Y instanceof l)){var R=1,q;if(L){if(q=u(K,W,y,I),!q||q.index>=y.length)break;var re=q.index,J=q.index+q[0].length,Q=W;for(Q+=G.value.length;re>=Q;)G=G.next,Q+=G.value.length;if(Q-=G.value.length,W=Q,G.value instanceof l)continue;for(var ee=G;ee!==w.tail&&(Q<J||typeof ee.value=="string");ee=ee.next)R++,Q+=ee.value.length;R--,Y=y.slice(W,Q),q.index-=W}else if(q=u(K,0,Y,I),!q)continue;var re=q.index,te=q[0],de=Y.slice(0,re),he=Y.slice(re+te.length),ue=W+Y.length;A&&ue>A.reach&&(A.reach=ue);var ge=G.prev;de&&(ge=h(w,ge,de),W+=de.length),p(w,ge,R);var ye=new l(k,O?s.tokenize(te,O):te,D,te);if(G=h(w,ge,ye),he&&h(w,G,he),R>1){var me={cause:k+","+C,reach:ue};d(y,w,x,G.prev,W,me),A&&me.reach>A.reach&&(A.reach=me.reach)}}}}}}function f(){var y={value:null,prev:null,next:null},w={value:null,prev:y,next:null};y.next=w,this.head=y,this.tail=w,this.length=0}function h(y,w,x){var E=w.next,$={value:x,prev:w,next:E};return w.next=$,E.prev=$,y.length++,$}function p(y,w,x){for(var E=w.next,$=0;$<x&&E!==y.tail;$++)E=E.next;w.next=E,E.prev=w,y.length-=$}function g(y){for(var w=[],x=y.head.next;x!==y.tail;)w.push(x.value),x=x.next;return w}if(!r.document)return r.addEventListener&&(s.disableWorkerMessageHandler||r.addEventListener("message",function(y){var w=JSON.parse(y.data),x=w.language,E=w.code,$=w.immediateClose;r.postMessage(s.highlight(E,s.languages[x],x)),$&&r.close()},!1)),s;var m=s.util.currentScript();m&&(s.filename=m.src,m.hasAttribute("data-manual")&&(s.manual=!0));function v(){s.manual||s.highlightAll()}if(!s.manual){var b=document.readyState;b==="loading"||b==="interactive"&&m&&m.defer?document.addEventListener("DOMContentLoaded",v):window.requestAnimationFrame?window.requestAnimationFrame(v):window.setTimeout(v,16)}return s})(e);t.exports&&(t.exports=n),typeof Z1<"u"&&(Z1.Prism=n),n.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.replace(/&/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(i,o){var a={};a["language-"+o]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[o]},a.cdata=/^<!\[CDATA\[|\]\]>$/i;var s={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:a}};s["language-"+o]={pattern:/[\s\S]+/,inside:n.languages[o]};var l={};l[i]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return i}),"i"),lookbehind:!0,greedy:!0,inside:s},n.languages.insertBefore("markup","cdata",l)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(r,i){n.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[i,"language-"+i],inside:n.languages[i]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,(function(r){var i=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+i.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+i.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+i.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+i.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:i,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var o=r.languages.markup;o&&(o.tag.addInlined("style","css"),o.tag.addAttribute("style","css"))})(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{"class-name":[n.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),n.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),n.languages.markup&&(n.languages.markup.tag.addInlined("script","javascript"),n.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),n.languages.js=n.languages.javascript,(function(){if(typeof n>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r="Loading…",i=function(m,v){return"✖ Error "+m+" while fetching file: "+v},o="✖ Error: File does not exist or is empty",a={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},s="data-src-status",l="loading",u="loaded",d="failed",f="pre[data-src]:not(["+s+'="'+u+'"]):not(['+s+'="'+l+'"])';function h(m,v,b){var y=new XMLHttpRequest;y.open("GET",m,!0),y.onreadystatechange=function(){y.readyState==4&&(y.status<400&&y.responseText?v(y.responseText):y.status>=400?b(i(y.status,y.statusText)):b(o))},y.send(null)}function p(m){var v=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(m||"");if(v){var b=Number(v[1]),y=v[2],w=v[3];return y?w?[b,Number(w)]:[b,void 0]:[b,b]}}n.hooks.add("before-highlightall",function(m){m.selector+=", "+f}),n.hooks.add("before-sanity-check",function(m){var v=m.element;if(v.matches(f)){m.code="",v.setAttribute(s,l);var b=v.appendChild(document.createElement("CODE"));b.textContent=r;var y=v.getAttribute("data-src"),w=m.language;if(w==="none"){var x=(/\.(\w+)$/.exec(y)||[,"none"])[1];w=a[x]||x}n.util.setLanguage(b,w),n.util.setLanguage(v,w);var E=n.plugins.autoloader;E&&E.loadLanguages(w),h(y,function($){v.setAttribute(s,u);var A=p(v.getAttribute("data-range"));if(A){var k=$.split(/\r\n?|\n/g),T=A[0],C=A[1]==null?k.length:A[1];T<0&&(T+=k.length),T=Math.max(0,Math.min(T-1,k.length)),C<0&&(C+=k.length),C=Math.max(0,Math.min(C,k.length)),$=k.slice(T,C).join(`
|
|
383
|
+
`),v.hasAttribute("data-start")||v.setAttribute("data-start",String(T+1))}b.textContent=$,n.highlightElement(b)},function($){v.setAttribute(s,d),b.textContent=$})}}),n.plugins.fileHighlight={highlight:function(v){for(var b=(v||document).querySelectorAll(f),y=0,w;w=b[y++];)n.highlightElement(w)}};var g=!1;n.fileHighlight=function(){g||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),g=!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}})()})(P_)),P_.exports}j9();Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));Prism.languages.js=Prism.languages.javascript;Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]};Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity;Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup;Prism.hooks.add("wrap",function(t){t.type==="entity"&&(t.attributes.title=t.content.replace(/&/,"&"))});Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,n){var r={};r["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[n]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};i["language-"+n]={pattern:/[\s\S]+/,inside:Prism.languages[n]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:i},Prism.languages.insertBefore("markup","cdata",o)}});Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(t,e){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+t+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[e,"language-"+e],inside:Prism.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}});Prism.languages.html=Prism.languages.markup;Prism.languages.mathml=Prism.languages.markup;Prism.languages.svg=Prism.languages.markup;Prism.languages.xml=Prism.languages.extend("markup",{});Prism.languages.ssml=Prism.languages.xml;Prism.languages.atom=Prism.languages.xml;Prism.languages.rss=Prism.languages.xml;(function(t){var e=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(d){return d=d.replace(/<inner>/g,function(){return e}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+d+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;t.languages.markdown=t.languages.extend("markup",{}),t.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:t.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+o+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+o+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:t.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:t.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(d){["url","bold","italic","strike","code-snippet"].forEach(function(f){d!==f&&(t.languages.markdown[d].inside.content.inside[f]=t.languages.markdown[f])})}),t.hooks.add("after-tokenize",function(d){if(d.language!=="markdown"&&d.language!=="md")return;function f(h){if(!(!h||typeof h=="string"))for(var p=0,g=h.length;p<g;p++){var m=h[p];if(m.type!=="code"){f(m.content);continue}var v=m.content[1],b=m.content[3];if(v&&b&&v.type==="code-language"&&b.type==="code-block"&&typeof v.content=="string"){var y=v.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");y=(/[a-z][\w-]*/i.exec(y)||[""])[0].toLowerCase();var w="language-"+y;b.alias?typeof b.alias=="string"?b.alias=[b.alias,w]:b.alias.push(w):b.alias=[w]}}}f(d.tokens)}),t.hooks.add("wrap",function(d){if(d.type==="code-block"){for(var f="",h=0,p=d.classes.length;h<p;h++){var g=d.classes[h],m=/language-(.+)/.exec(g);if(m){f=m[1];break}}var v=t.languages[f];if(v)d.content=t.highlight(u(d.content),v,f);else if(f&&f!=="none"&&t.plugins.autoloader){var b="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);d.attributes.id=b,t.plugins.autoloader.loadLanguages(f,function(){var y=document.getElementById(b);y&&(y.innerHTML=t.highlight(y.textContent,t.languages[f],f))})}}});var a=RegExp(t.languages.markup.tag.pattern.source,"gi"),s={amp:"&",lt:"<",gt:">",quot:'"'},l=String.fromCodePoint||String.fromCharCode;function u(d){var f=d.replace(a,"");return f=f.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(h,p){if(p=p.toLowerCase(),p[0]==="#"){var g;return p[1]==="x"?g=parseInt(p.slice(2),16):g=Number(p.slice(1)),l(g)}else{var m=s[p];return m||h}}),f}t.languages.md=t.languages.markdown})(Prism);Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/});Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}});Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}});Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/});delete Prism.languages.c.boolean;(function(t){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+e.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var n=t.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))})(Prism);Prism.languages.objectivec=Prism.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/});delete Prism.languages.objectivec["class-name"];Prism.languages.objc=Prism.languages.objectivec;Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};(function(t){var e=t.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};e.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:e},boolean:e.boolean,variable:e.variable}})(Prism);var cT={},uT;function U9(){return uT||(uT=1,Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python),cT}U9();var dT={},fT;function B9(){return fT||(fT=1,(function(t){for(var e=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)e=e.replace(/<self>/g,function(){return e});e=e.replace(/<self>/g,function(){return/[^\s\S]/.source}),t.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+e),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},t.languages.rust["closure-params"].inside.rest=t.languages.rust,t.languages.rust.attribute.inside.string=t.languages.rust.string})(Prism)),dT}B9();Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/};Prism.languages.swift["string-literal"].forEach(function(t){t.inside.interpolation.inside=Prism.languages.swift});var hT={},pT;function q9(){return pT||(pT=1,(function(t){t.languages.typescript=t.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),t.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete t.languages.typescript.parameter,delete t.languages.typescript["literal-property"];var e=t.languages.extend("typescript",{});delete e["class-name"],t.languages.typescript["class-name"].inside=e,t.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e}}}}),t.languages.ts=t.languages.typescript})(Prism)),hT}q9();var gT={},mT;function H9(){return mT||(mT=1,(function(t){var e=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};t.languages.java=t.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:e,function:[t.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),t.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),t.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:e,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return e.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(Prism)),gT}H9();var vT={},_T;function K9(){return _T||(_T=1,(function(t){var e=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return e.source});t.languages.cpp=t.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return e.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:e,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),t.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),t.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t.languages.cpp}}}}),t.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),t.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:t.languages.extend("cpp",{})}}),t.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},t.languages.cpp["base-clause"])})(Prism)),vT}K9();function dv(t,...e){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",t);for(const i of e)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const V9="javascript";function UI(t,e){for(const n of t.childNodes){if(In(n)&&n.tagName===e)return!0;UI(n,e)}return!1}const uf="data-language",Hd="data-highlight-language",Ip="data-theme";let Ol=class BI extends ir{__language;__theme;__isSyntaxHighlightSupported;static getType(){return"code"}static clone(e){return new BI(e.__language,e.__key)}constructor(e,n){super(n),this.__language=e||void 0,this.__isSyntaxHighlightSupported=!1,this.__theme=void 0}afterCloneFrom(e){super.afterCloneFrom(e),this.__language=e.__language,this.__theme=e.__theme,this.__isSyntaxHighlightSupported=e.__isSyntaxHighlightSupported}createDOM(e){const n=document.createElement("code");Rr(n,e.theme.code),n.setAttribute("spellcheck","false");const r=this.getLanguage();r&&(n.setAttribute(uf,r),this.getIsSyntaxHighlightSupported()&&n.setAttribute(Hd,r));const i=this.getTheme();i&&n.setAttribute(Ip,i);const o=this.getStyle();return o&&n.setAttribute("style",o),n}updateDOM(e,n,r){const i=this.__language,o=e.__language;i?i!==o&&n.setAttribute(uf,i):o&&n.removeAttribute(uf);const a=this.__isSyntaxHighlightSupported;e.__isSyntaxHighlightSupported&&o?a&&i?i!==o&&n.setAttribute(Hd,i):n.removeAttribute(Hd):a&&i&&n.setAttribute(Hd,i);const s=this.__theme,l=e.__theme;s?s!==l&&n.setAttribute(Ip,s):l&&n.removeAttribute(Ip);const u=this.__style,d=e.__style;return u?u!==d&&n.setAttribute("style",u):d&&n.removeAttribute("style"),!1}exportDOM(e){const n=document.createElement("pre");Rr(n,e._config.theme.code),n.setAttribute("spellcheck","false");const r=this.getLanguage();r&&(n.setAttribute(uf,r),this.getIsSyntaxHighlightSupported()&&n.setAttribute(Hd,r));const i=this.getTheme();i&&n.setAttribute(Ip,i);const o=this.getStyle();return o&&n.setAttribute("style",o),{element:n}}static importDOM(){return{code:e=>e.textContent!=null&&(/\r?\n/.test(e.textContent)||UI(e,"BR"))?{conversion:bT,priority:1}:null,div:()=>({conversion:G9,priority:1}),pre:()=>({conversion:bT,priority:0}),table:e=>O_(e)?{conversion:W9,priority:3}:null,td:e=>{const n=e,r=n.closest("table");return n.classList.contains("js-file-line")||r&&O_(r)?{conversion:yT,priority:3}:null},tr:e=>{const n=e.closest("table");return n&&O_(n)?{conversion:yT,priority:3}:null}}}static importJSON(e){return Io().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setLanguage(e.language).setTheme(e.theme)}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),theme:this.getTheme()}}insertNewAfter(e,n=!0){const r=this.getChildren(),i=r.length;if(i>=2&&r[i-1].getTextContent()===`
|
|
384
384
|
`&&r[i-2].getTextContent()===`
|
|
385
|
-
`&&e.isCollapsed()&&e.anchor.key===this.__key&&e.anchor.offset===i){r[i-1].remove(),r[i-2].remove();const l=Tn();return this.insertAfter(l,n),l}const{anchor:o,focus:a}=e,s=(o.isBefore(a)?o:a).getNode();if(Ye(s)){let l=Ll(s);const u=[];for(;;)if(hi(l))u.push(Do()),l=l.getNextSibling();else{if(!Qn(l))break;{let v=0;const b=l.getTextContent(),y=l.getTextContentSize();for(;v<y&&b[v]===" ";)v++;if(v!==0&&u.push(Z0(" ".repeat(v))),v!==y)break;l=l.getNextSibling()}}const d=s.splitText(o.offset)[0],f=o.offset===0?0:1,h=d.getIndexWithinParent()+f,p=s.getParentOrThrow(),g=[no(),...u];p.splice(h,0,g);const m=u[u.length-1];m?m.select():o.offset===0?d.selectPrevious():d.getNextSibling().selectNext(0,0)}if(bi(s)){const{offset:l}=e.anchor;s.splice(l,0,[no()]),s.select(l+1,l+1)}return null}canIndent(){return!1}collapseAtStart(){const e=Tn();return this.getChildren().forEach(n=>e.append(n)),this.replace(e),!0}setLanguage(e){const n=this.getWritable();return n.__language=e||void 0,n}getLanguage(){return this.getLatest().__language}setIsSyntaxHighlightSupported(e){const n=this.getWritable();return n.__isSyntaxHighlightSupported=e,n}getIsSyntaxHighlightSupported(){return this.getLatest().__isSyntaxHighlightSupported}setTheme(e){const n=this.getWritable();return n.__theme=e||void 0,n}getTheme(){return this.getLatest().__theme}};function Io(t,e){return
|
|
385
|
+
`&&e.isCollapsed()&&e.anchor.key===this.__key&&e.anchor.offset===i){r[i-1].remove(),r[i-2].remove();const l=Tn();return this.insertAfter(l,n),l}const{anchor:o,focus:a}=e,s=(o.isBefore(a)?o:a).getNode();if(Ye(s)){let l=Ll(s);const u=[];for(;;)if(hi(l))u.push(Do()),l=l.getNextSibling();else{if(!Qn(l))break;{let v=0;const b=l.getTextContent(),y=l.getTextContentSize();for(;v<y&&b[v]===" ";)v++;if(v!==0&&u.push(Z0(" ".repeat(v))),v!==y)break;l=l.getNextSibling()}}const d=s.splitText(o.offset)[0],f=o.offset===0?0:1,h=d.getIndexWithinParent()+f,p=s.getParentOrThrow(),g=[no(),...u];p.splice(h,0,g);const m=u[u.length-1];m?m.select():o.offset===0?d.selectPrevious():d.getNextSibling().selectNext(0,0)}if(bi(s)){const{offset:l}=e.anchor;s.splice(l,0,[no()]),s.select(l+1,l+1)}return null}canIndent(){return!1}collapseAtStart(){const e=Tn();return this.getChildren().forEach(n=>e.append(n)),this.replace(e),!0}setLanguage(e){const n=this.getWritable();return n.__language=e||void 0,n}getLanguage(){return this.getLatest().__language}setIsSyntaxHighlightSupported(e){const n=this.getWritable();return n.__isSyntaxHighlightSupported=e,n}getIsSyntaxHighlightSupported(){return this.getLatest().__isSyntaxHighlightSupported}setTheme(e){const n=this.getWritable();return n.__theme=e||void 0,n}getTheme(){return this.getLatest().__theme}};function Io(t,e){return _9(Ol).setLanguage(t).setTheme(e)}function bi(t){return t instanceof Ol}function bT(t){return{node:Io(t.getAttribute(uf))}}function G9(t){const e=t,n=wT(e);return n||(function(r){let i=r.parentElement;for(;i!==null;){if(wT(i))return!0;i=i.parentElement}return!1})(e)?{node:n?Io():null}:{node:null}}function W9(){return{node:Io()}}function yT(){return{node:null}}function wT(t){return t.style.fontFamily.match("monospace")!==null}function O_(t){return t.classList.contains("js-file-line-container")}let dh=class qI extends cs{__highlightType;constructor(e="",n,r){super(e,r),this.__highlightType=n}static getType(){return"code-highlight"}static clone(e){return new qI(e.__text,e.__highlightType||void 0,e.__key)}getHighlightType(){return this.getLatest().__highlightType}setHighlightType(e){const n=this.getWritable();return n.__highlightType=e||void 0,n}canHaveFormat(){return!1}createDOM(e){const n=super.createDOM(e),r=L_(e.theme,this.__highlightType);return Rr(n,r),n}updateDOM(e,n,r){const i=super.updateDOM(e,n,r),o=L_(r.theme,e.__highlightType),a=L_(r.theme,this.__highlightType);return o!==a&&(o&&Pl(n,o),a&&Rr(n,a)),i}static importJSON(e){return Z0().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setHighlightType(e.highlightType)}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType()}}setFormat(e){return this}isParentRequired(){return!0}createParentElementNode(){return Io()}};function L_(t,e){return e&&t&&t.codeHighlight&&t.codeHighlight[e]}function Z0(t="",e){return Di(new dh(t,e))}function Qn(t){return t instanceof dh}function HI(t,e){let n=t;for(let r=Cr(t,e);r&&(Qn(r.origin)||hi(r.origin));r=M9(r))n=r.origin;return n}function Ll(t){return HI(t,"previous")}function lu(t){return HI(t,"next")}function Y9(t){const e=Ll(t),n=lu(t);let r=e;for(;r!==null;){if(Qn(r)){const o=r9(r.getTextContent());if(o!==null)return o}if(r===n)break;r=r.getNextSibling()}const i=e.getParent();if(we(i)){const o=i.getDirection();if(o==="ltr"||o==="rtl")return o}return null}function J9(t,e){let n=null,r=null,i=t,o=e,a=t.getTextContent();for(;;){if(o===0){if(i=i.getPreviousSibling(),i===null)break;if(Qn(i)||hi(i)||Bn(i)||dv(167),Bn(i)){n={node:i,offset:1};break}o=Math.max(0,i.getTextContentSize()-1),a=i.getTextContent()}else o--;const l=a[o];Qn(i)&&l!==" "&&(r={node:i,offset:o})}if(r!==null)return r;let s=null;if(e<t.getTextContentSize())Qn(t)&&(s=t.getTextContent()[e]);else{const l=t.getNextSibling();Qn(l)&&(s=l.getTextContent()[0])}if(s!==null&&s!==" ")return n;{const l=(function(u,d){let f=u,h=d,p=u.getTextContent(),g=u.getTextContentSize();for(;;){if(!Qn(f)||h===g){if(f=f.getNextSibling(),f===null||Bn(f))return null;Qn(f)&&(h=0,p=f.getTextContent(),g=f.getTextContentSize())}if(Qn(f)){if(p[h]!==" ")return{node:f,offset:h};h++}}})(t,e);return l!==null?l:n}}function X9(t){const e=lu(t);return Bn(e)&&dv(168),e}(function(t){t.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var e={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(e).forEach(function(n){var r=e[n],i=[];/^\w+$/.test(n)||i.push(/\w+/.exec(n)[0]),n==="diff"&&i.push("bold"),t.languages.diff[n]={pattern:RegExp("^(?:["+r+`].*(?:\r
|
|
386
386
|
?|
|
|
387
|
-
|(?![\\s\\S])))+`,"m"),alias:i,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}}),Object.defineProperty(t.languages.diff,"PREFIXES",{value:e})})(Prism);const ta=globalThis.Prism||window.Prism;function Yy(t){return typeof t=="string"?t:Array.isArray(t)?t.map(Yy).join(""):Yy(t.content)}function
|
|
387
|
+
|(?![\\s\\S])))+`,"m"),alias:i,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}}),Object.defineProperty(t.languages.diff,"PREFIXES",{value:e})})(Prism);const ta=globalThis.Prism||window.Prism;function Yy(t){return typeof t=="string"?t:Array.isArray(t)?t.map(Yy).join(""):Yy(t.content)}function Z9(t,e){const n=/^diff-([\w-]+)/i.exec(e),r=t.getTextContent();let i=ta.tokenize(r,ta.languages[n?"diff":e]);return n&&(i=(function(o,a){const s=a,l=ta.languages[s],u={tokens:o},d=ta.languages.diff.PREFIXES;for(const f of u.tokens){if(typeof f=="string"||!(f.type in d)||!Array.isArray(f.content))continue;const h=f.type;let p=0;const g=()=>(p++,new ta.Token("prefix",d[h],h.replace(/^(\w+).*/,"$1"))),m=f.content.filter(E=>typeof E=="string"||E.type!=="prefix"),v=f.content.length-m.length,b=ta.tokenize(Yy(m),l);b.unshift(g());const y=/\r\n|\n/g,w=E=>{const $=[];y.lastIndex=0;let A,k=0;for(;p<v&&(A=y.exec(E));){const T=A.index+A[0].length;$.push(E.slice(k,T)),k=T,$.push(g())}if($.length!==0)return k<E.length&&$.push(E.slice(k)),$},x=E=>{for(let $=0;$<E.length&&p<v;$++){const A=E[$];if(typeof A=="string"){const k=w(A);k&&(E.splice($,1,...k),$+=k.length-1)}else if(typeof A.content=="string"){const k=w(A.content);k&&(A.content=k)}else Array.isArray(A.content)?x(A.content):x([A.content])}};x(b),p<v&&b.push(g()),f.content=b}return u.tokens})(i,n[1])),Jy(i)}function Jy(t,e){const n=[];for(const r of t)if(typeof r=="string"){const i=r.split(/(\n|\t)/),o=i.length;for(let a=0;a<o;a++){const s=i[a];s===`
|
|
388
388
|
`||s===`\r
|
|
389
|
-
`?n.push(no()):s===" "?n.push(Do()):s.length>0&&n.push(Z0(s,e))}}else{const{content:i,alias:o}=r;typeof i=="string"?n.push(...Jy([i],r.type==="prefix"&&typeof o=="string"?o:r.type)):Array.isArray(i)&&n.push(...Jy(i,r.type==="unchanged"?void 0:r.type))}return n}const KI={$tokenize(t,e){return
|
|
389
|
+
`?n.push(no()):s===" "?n.push(Do()):s.length>0&&n.push(Z0(s,e))}}else{const{content:i,alias:o}=r;typeof i=="string"?n.push(...Jy([i],r.type==="prefix"&&typeof o=="string"?o:r.type)):Array.isArray(i)&&n.push(...Jy(i,r.type==="unchanged"?void 0:r.type))}return n}const KI={$tokenize(t,e){return Z9(t,e||this.defaultLanguage)},defaultLanguage:V9,tokenize(t,e){return ta.tokenize(t,ta.languages[e||""]||ta.languages[this.defaultLanguage])}};function xT(t,e,n){const r=t.getParent();bi(r)?VI(r,e,n):Qn(t)&&t.replace(zn(t.__text))}function Q9(t,e){const n=e.getElementByKey(t.getKey());if(n===null)return;const r=t.getChildren(),i=r.length;if(i===n.__cachedChildrenLength)return;n.__cachedChildrenLength=i;let o="1",a=1;for(let s=0;s<i;s++)Bn(r[s])&&(o+=`
|
|
390
390
|
`+ ++a);n.setAttribute("data-gutter",o)}const I_=new Set;function VI(t,e,n){const r=t.getKey();t.getLanguage()===void 0&&t.setLanguage(n.defaultLanguage);const i=t.getLanguage()||n.defaultLanguage;if(!(function(o){const a=(function(l){const u=/^diff-([\w-]+)/i.exec(l);return u?u[1]:null})(o),s=a||o;try{return!!s&&ta.languages.hasOwnProperty(s)}catch{return!1}})(i))return t.getIsSyntaxHighlightSupported()&&t.setIsSyntaxHighlightSupported(!1),void(async function(){})();t.getIsSyntaxHighlightSupported()||t.setIsSyntaxHighlightSupported(!0),I_.has(r)||(I_.add(r),e.update(()=>{(function(o,a){const s=qn(o);if(!bi(s)||!s.isAttached())return;const l=Ge();if(!De(l))return void a();const u=l.anchor,d=u.offset,f=u.type==="element"&&Bn(s.getChildAtIndex(u.offset-1));let h=0;if(!f){const p=u.getNode();h=d+p.getPreviousSiblings().reduce((g,m)=>g+m.getTextContentSize(),0)}if(a()){if(f)return void u.getNode().select(d,d);s.getChildren().some(p=>{const g=Ye(p);if(g||Bn(p)){const m=p.getTextContentSize();if(g&&m>=h)return p.select(h,h),!0;h-=m}return!1})}})(r,()=>{const o=qn(r);if(!bi(o)||!o.isAttached())return!1;const a=o.getLanguage()||n.defaultLanguage,s=n.$tokenize(o,a),l=(function(h,p){let g=0;for(;g<h.length&&kT(h[g],p[g]);)g++;const m=h.length,v=p.length,b=Math.min(m,v)-g;let y=0;for(;y<b;)if(y++,!kT(h[m-y],p[v-y])){y--;break}const w=g,x=m-y,E=p.slice(g,v-y);return{from:w,nodesForReplacement:E,to:x}})(o.getChildren(),s),{from:u,to:d,nodesForReplacement:f}=l;return!(u===d&&!f.length)&&(t.splice(u,d-u,f),!0)})},{onUpdate:()=>{I_.delete(r)},skipTransforms:!0}))}function kT(t,e){return Qn(t)&&Qn(e)&&t.__text===e.__text&&t.__highlightType===e.__highlightType||hi(t)&&hi(e)||Bn(t)&&Bn(e)}function yl(t){if(!De(t))return!1;const e=t.anchor.getNode(),n=bi(e)?e:e.getParent(),r=t.focus.getNode(),i=bi(r)?r:r.getParent();return bi(n)&&n.is(i)}function GI(t){const e=t.getNodes(),n=[];if(e.length===1&&bi(e[0]))return n;let r=[];for(let i=0;i<e.length;i++){const o=e[i];Qn(o)||hi(o)||Bn(o)||dv(169),Bn(o)?r.length>0&&(n.push(r),r=[]):r.push(o)}if(r.length>0){const i=t.isBackward()?t.anchor:t.focus,o=Ri(r[0].getKey(),0,"text");i.is(o)||n.push(r)}return n}function ST(t){const e=Ge();if(!De(e)||!yl(e))return!1;const n=GI(e),r=n.length;if(r===0&&e.isCollapsed())return t===Os&&e.insertNodes([Do()]),!0;if(r===0&&t===Os&&e.getTextContent()===`
|
|
391
|
-
`){const i=Do(),o=no(),a=e.isBackward()?"previous":"next";return e.insertNodes([i,o]),CI(X0(Qa(Bs(i,"next",0),Lo(Cr(o,"next"))),a)),!0}for(let i=0;i<r;i++){const o=n[i];if(o.length>0){let a=o[0];if(i===0&&(a=Ll(a)),t===Os){const s=Do();if(a.insertBefore(s),i===0){const l=e.isBackward()?"focus":"anchor",u=Ri(a.getKey(),0,"text");e[l].is(u)&&e[l].set(s.getKey(),0,"text")}}else hi(a)&&a.remove()}}return!0}function ET(t,e){const n=Ge();if(!De(n))return!1;const{anchor:r,focus:i}=n,o=r.offset,a=i.offset,s=r.getNode(),l=i.getNode(),u=t===Mu;if(!yl(n)||!Qn(s)&&!hi(s)||!Qn(l)&&!hi(l))return!1;if(!e.altKey){if(n.isCollapsed()){const b=s.getParentOrThrow();if(u&&o===0&&s.getPreviousSibling()===null){if(b.getPreviousSibling()===null)return b.selectPrevious(),e.preventDefault(),!0}else if(!u&&o===s.getTextContentSize()&&s.getNextSibling()===null&&b.getNextSibling()===null)return b.selectNext(),e.preventDefault(),!0}return!1}let d,f;if(s.isBefore(l)?(d=Ll(s),f=lu(l)):(d=Ll(l),f=lu(s)),d==null||f==null)return!1;const h=d.getNodesBetween(f);for(let b=0;b<h.length;b++){const y=h[b];if(!Qn(y)&&!hi(y)&&!Bn(y))return!1}e.preventDefault(),e.stopPropagation();const p=u?d.getPreviousSibling():f.getNextSibling();if(!Bn(p))return!0;const g=u?p.getPreviousSibling():p.getNextSibling();if(g==null)return!0;const m=Qn(g)||hi(g)||Bn(g)?u?Ll(g):lu(g):null;let v=m??g;return p.remove(),h.forEach(b=>b.remove()),t===Mu?(h.forEach(b=>v.insertBefore(b)),v.insertBefore(p)):(v.insertAfter(p),v=p,h.forEach(b=>{v.insertAfter(b),v=b})),n.setTextNodeRange(s,o,l,a),!0}function TT(t,e){const n=Ge();if(!De(n))return!1;const{anchor:r,focus:i}=n,o=r.getNode(),a=i.getNode(),s=t===Fg;if(!yl(n)||!Qn(o)&&!hi(o)||!Qn(a)&&!hi(a))return!1;const l=a;if(YV(l)==="rtl"?!s:s){const u=JV(l,i.offset);if(u!==null){const{node:d,offset:f}=u;Bn(d)?d.selectNext(0,0):n.setTextNodeRange(d,f,d,f)}else l.getParentOrThrow().selectStart()}else XV(l).select();return e.preventDefault(),e.stopPropagation(),!0}function e7(t,e){if(!t.hasNodes([Ol,dh]))throw new Error("CodeHighlightPlugin: CodeNode or CodeHighlightNode not registered on editor");e==null&&(e=KI);const n=[];return t._headless!==!0&&n.push(t.registerMutationListener(Ol,r=>{t.getEditorState().read(()=>{for(const[i,o]of r)if(o!=="destroyed"){const a=qn(i);a!==null&&QV(a,t)}})},{skipInitialization:!1})),n.push(t.registerNodeTransform(Ol,r=>VI(r,t,e)),t.registerNodeTransform(cs,r=>xT(r,t,e)),t.registerNodeTransform(dh,r=>xT(r,t,e)),t.registerCommand(T0,r=>{const i=(function(o){const a=Ge();if(!De(a)||!yl(a))return null;const s=o?_l:Os,l=o?_l:Ly,u=a.anchor,d=a.focus;if(u.is(d))return l;const f=GI(a);if(f.length!==1)return s;const h=f[0];let p,g;h.length===0&&dv(285),a.isBackward()?(p=d,g=u):(p=u,g=d);const m=Ll(h[0]),v=lu(h[0]),b=Ri(m.getKey(),0,"text"),y=Ri(v.getKey(),v.getTextContentSize(),"text");return p.isBefore(b)||y.isBefore(g)?s:b.isBefore(p)||g.isBefore(y)?l:s})(r.shiftKey);return i!==null&&(r.preventDefault(),t.dispatchCommand(i,void 0),!0)},hs),t.registerCommand(Ly,()=>!!yl(Ge())&&(yd([Do()]),!0),hs),t.registerCommand(Os,r=>ST(Os),hs),t.registerCommand(_l,r=>ST(_l),hs),t.registerCommand(Mu,r=>{const i=Ge();if(!De(i))return!1;const{anchor:o}=i,a=o.getNode();return!!yl(i)&&(i.isCollapsed()&&o.offset===0&&a.getPreviousSibling()===null&&bi(a.getParentOrThrow())?(r.preventDefault(),!0):ET(Mu,r))},hs),t.registerCommand(zg,r=>{const i=Ge();if(!De(i))return!1;const{anchor:o}=i,a=o.getNode();return!!yl(i)&&(i.isCollapsed()&&o.offset===a.getTextContentSize()&&a.getNextSibling()===null&&bi(a.getParentOrThrow())?(r.preventDefault(),!0):ET(zg,r))},hs),t.registerCommand(Fg,r=>TT(Fg,r),hs),t.registerCommand(Oy,r=>TT(Oy,r),hs)),uh(...n)}const t7=Symbol.for("preact-signals");function fv(){if(Ns>1)return void Ns--;let t,e=!1;for(;Of!==void 0;){let n=Of;for(Of=void 0,Xy++;n!==void 0;){const r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&WI(n))try{n.c()}catch(i){e||(t=i,e=!0)}n=r}}if(Xy=0,Ns--,e)throw t}function n7(t){if(Ns>0)return t();Ns++;try{return t()}finally{fv()}}let rn,Of;function $T(t){const e=rn;rn=void 0;try{return t()}finally{rn=e}}let Ns=0,Xy=0,og=0;function AT(t){if(rn===void 0)return;let e=t.n;return e===void 0||e.t!==rn?(e={i:0,S:t,p:rn.s,n:void 0,t:rn,e:void 0,x:void 0,r:e},rn.s!==void 0&&(rn.s.n=e),rn.s=e,t.n=e,32&rn.f&&t.S(e),e):e.i===-1?(e.i=0,e.n!==void 0&&(e.n.p=e.p,e.p!==void 0&&(e.p.n=e.n),e.p=rn.s,e.n=void 0,rn.s.n=e,rn.s=e),e):void 0}function ii(t,e){this.v=t,this.i=0,this.n=void 0,this.t=void 0,this.W=e?.watched,this.Z=e?.unwatched,this.name=e?.name}function r7(t,e){return new ii(t,e)}function WI(t){for(let e=t.s;e!==void 0;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function CT(t){for(let e=t.s;e!==void 0;e=e.n){const n=e.S.n;if(n!==void 0&&(e.r=n),e.S.n=e,e.i=-1,e.n===void 0){t.s=e;break}}}function YI(t){let e,n=t.s;for(;n!==void 0;){const r=n.p;n.i===-1?(n.S.U(n),r!==void 0&&(r.n=n.n),n.n!==void 0&&(n.n.p=r)):e=n,n.S.n=n.r,n.r!==void 0&&(n.r=void 0),n=r}t.s=e}function Dc(t,e){ii.call(this,void 0),this.x=t,this.s=void 0,this.g=og-1,this.f=4,this.W=e?.watched,this.Z=e?.unwatched,this.name=e?.name}function JI(t){const e=t.u;if(t.u=void 0,typeof e=="function"){Ns++;const n=rn;rn=void 0;try{e()}catch(r){throw t.f&=-2,t.f|=8,Q0(t),r}finally{rn=n,fv()}}}function Q0(t){for(let e=t.s;e!==void 0;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,JI(t)}function i7(t){if(rn!==this)throw new Error("Out-of-order effect");YI(this),rn=t,this.f&=-2,8&this.f&&Q0(this),fv()}function Vc(t,e){this.x=t,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32,this.name=e?.name}function e1(t,e){const n=new Vc(t,e);try{n.c()}catch(i){throw n.d(),i}const r=n.d.bind(n);return r[Symbol.dispose]=r,r}function o7(t,e={}){const n={};for(const r in t){const i=e[r],o=r7(i===void 0?t[r]:i);n[r]=o}return n}ii.prototype.brand=t7,ii.prototype.h=function(){return!0},ii.prototype.S=function(t){const e=this.t;e!==t&&t.e===void 0&&(t.x=e,this.t=t,e!==void 0?e.e=t:$T(()=>{var n;(n=this.W)==null||n.call(this)}))},ii.prototype.U=function(t){if(this.t!==void 0){const e=t.e,n=t.x;e!==void 0&&(e.x=n,t.e=void 0),n!==void 0&&(n.e=e,t.x=void 0),t===this.t&&(this.t=n,n===void 0&&$T(()=>{var r;(r=this.Z)==null||r.call(this)}))}},ii.prototype.subscribe=function(t){return e1(()=>{const e=this.value,n=rn;rn=void 0;try{t(e)}finally{rn=n}},{name:"sub"})},ii.prototype.valueOf=function(){return this.value},ii.prototype.toString=function(){return this.value+""},ii.prototype.toJSON=function(){return this.value},ii.prototype.peek=function(){const t=rn;rn=void 0;try{return this.value}finally{rn=t}},Object.defineProperty(ii.prototype,"value",{get(){const t=AT(this);return t!==void 0&&(t.i=this.i),this.v},set(t){if(t!==this.v){if(Xy>100)throw new Error("Cycle detected");this.v=t,this.i++,og++,Ns++;try{for(let e=this.t;e!==void 0;e=e.x)e.t.N()}finally{fv()}}}}),Dc.prototype=new ii,Dc.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===og))return!0;if(this.g=og,this.f|=1,this.i>0&&!WI(this))return this.f&=-2,!0;const t=rn;try{CT(this),rn=this;const e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return rn=t,YI(this),this.f&=-2,!0},Dc.prototype.S=function(t){if(this.t===void 0){this.f|=36;for(let e=this.s;e!==void 0;e=e.n)e.S.S(e)}ii.prototype.S.call(this,t)},Dc.prototype.U=function(t){if(this.t!==void 0&&(ii.prototype.U.call(this,t),this.t===void 0)){this.f&=-33;for(let e=this.s;e!==void 0;e=e.n)e.S.U(e)}},Dc.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(let t=this.t;t!==void 0;t=t.x)t.t.N()}},Object.defineProperty(Dc.prototype,"value",{get(){if(1&this.f)throw new Error("Cycle detected");const t=AT(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}}),Vc.prototype.c=function(){const t=this.S();try{if(8&this.f||this.x===void 0)return;const e=this.x();typeof e=="function"&&(this.u=e)}finally{t()}},Vc.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,JI(this),CT(this),Ns++;const t=rn;return rn=this,i7.bind(this,t)},Vc.prototype.N=function(){2&this.f||(this.f|=2,this.o=Of,Of=this)},Vc.prototype.d=function(){this.f|=8,1&this.f||Q0(this)},Vc.prototype.dispose=function(){this.d()};function a7(t){return(typeof t.nodes=="function"?t.nodes():t.nodes)||[]}function wn(t,...e){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",t);for(const i of e)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function XI(t,e){if(t&&e&&!Array.isArray(e)&&typeof t=="object"&&typeof e=="object"){const n=t,r=e;for(const i in r)n[i]=XI(n[i],r[i]);return t}return e}const t1=0,Zy=1,ZI=2,N_=3,Np=4,Fc=5,R_=6,Kd=7;function M_(t){return t.id===t1}function QI(t){return t.id===ZI}function s7(t){return(function(e){return e.id===Zy})(t)||wn(305,String(t.id),String(Zy)),Object.assign(t,{id:ZI})}const l7=new Set;let c7=class{builder;configs;_dependency;_peerNameSet;extension;state;_signal;constructor(e,n){this.builder=e,this.extension=n,this.configs=new Set,this.state={id:t1}}mergeConfigs(){let e=this.extension.config||{};const n=this.extension.mergeConfig?this.extension.mergeConfig.bind(this.extension):PV;for(const r of this.configs)e=n(e,r);return e}init(e){const n=this.state;QI(n)||wn(306,String(n.id));const r={getDependency:this.getInitDependency.bind(this),getDirectDependentNames:this.getDirectDependentNames.bind(this),getPeer:this.getInitPeer.bind(this),getPeerNameSet:this.getPeerNameSet.bind(this)},i={...r,getDependency:this.getDependency.bind(this),getInitResult:this.getInitResult.bind(this),getPeer:this.getPeer.bind(this)},o=(function(s,l,u){return Object.assign(s,{config:l,id:N_,registerState:u})})(n,this.mergeConfigs(),r);let a;this.state=o,this.extension.init&&(a=this.extension.init(e,o.config,r)),this.state=(function(s,l,u){return Object.assign(s,{id:Np,initResult:l,registerState:u})})(o,a,i)}build(e){const n=this.state;let r;n.id!==Np&&wn(307,String(n.id),String(Fc)),this.extension.build&&(r=this.extension.build(e,n.config,n.registerState));const i={...n.registerState,getOutput:()=>r,getSignal:this.getSignal.bind(this)};this.state=(function(o,a,s){return Object.assign(o,{id:Fc,output:a,registerState:s})})(n,r,i)}register(e,n){this._signal=n;const r=this.state;r.id!==Fc&&wn(308,String(r.id),String(Fc));const i=this.extension.register&&this.extension.register(e,r.config,r.registerState);return this.state=(function(o){return Object.assign(o,{id:R_})})(r),()=>{const o=this.state;o.id!==Kd&&wn(309,String(r.id),String(Kd)),this.state=(function(a){return Object.assign(a,{id:Fc})})(o),i&&i()}}afterRegistration(e){const n=this.state;let r;return n.id!==R_&&wn(310,String(n.id),String(R_)),this.extension.afterRegistration&&(r=this.extension.afterRegistration(e,n.config,n.registerState)),this.state=(function(i){return Object.assign(i,{id:Kd})})(n),r}getSignal(){return this._signal===void 0&&wn(311),this._signal}getInitResult(){this.extension.init===void 0&&wn(312,this.extension.name);const e=this.state;return(function(n){return n.id>=Np})(e)||wn(313,String(e.id),String(Np)),e.initResult}getInitPeer(e){const n=this.builder.extensionNameMap.get(e);return n?n.getExtensionInitDependency():void 0}getExtensionInitDependency(){const e=this.state;return(function(n){return n.id>=N_})(e)||wn(314,String(e.id),String(N_)),{config:e.config}}getPeer(e){const n=this.builder.extensionNameMap.get(e);return n?n.getExtensionDependency():void 0}getInitDependency(e){const n=this.builder.getExtensionRep(e);return n===void 0&&wn(315,this.extension.name,e.name),n.getExtensionInitDependency()}getDependency(e){const n=this.builder.getExtensionRep(e);return n===void 0&&wn(315,this.extension.name,e.name),n.getExtensionDependency()}getState(){const e=this.state;return(function(n){return n.id>=Kd})(e)||wn(316,String(e.id),String(Kd)),e}getDirectDependentNames(){return this.builder.incomingEdges.get(this.extension.name)||l7}getPeerNameSet(){let e=this._peerNameSet;return e||(e=new Set((this.extension.peerDependencies||[]).map(([n])=>n)),this._peerNameSet=e),e}getExtensionDependency(){if(!this._dependency){const e=this.state;(function(n){return n.id>=Fc})(e)||wn(317,this.extension.name),this._dependency={config:e.config,init:e.initResult,output:e.output}}return this._dependency}};const PT={tag:$f};function u7(){const t=ar();t.isEmpty()&&t.append(Tn())}const d7={config:{setOptions:PT,updateOptions:PT},init:({$initialEditorState:t=u7})=>({$initialEditorState:t,initialized:!1}),afterRegistration(t,{updateOptions:e,setOptions:n},r){const i=r.getInitResult();if(!i.initialized){i.initialized=!0;const{$initialEditorState:o}=i;if(XK(o))t.setEditorState(o,n);else if(typeof o=="function")t.update(()=>{o(t)},e);else if(o&&(typeof o=="string"||typeof o=="object")){const a=t.parseEditorState(o);t.setEditorState(a,n)}}return()=>{}},name:"@lexical/extension/InitialState",nodes:[wd,cs,_d,bd,xd]},OT=Symbol.for("@lexical/extension/LexicalBuilder");function LT(){}function f7(t){throw t}function Rp(t){return Array.isArray(t)?t:[t]}const D_="0.38.2+prod.esm";let h7=class ag{roots;extensionNameMap;outgoingConfigEdges;incomingEdges;conflicts;_sortedExtensionReps;PACKAGE_VERSION;constructor(e){this.outgoingConfigEdges=new Map,this.incomingEdges=new Map,this.extensionNameMap=new Map,this.conflicts=new Map,this.PACKAGE_VERSION=D_,this.roots=e;for(const n of e)this.addExtension(n)}static fromExtensions(e){const n=[Rp(d7)];for(const r of e)n.push(Rp(r));return new ag(n)}static maybeFromEditor(e){const n=e[OT];return n&&(n.PACKAGE_VERSION!==D_&&wn(292,n.PACKAGE_VERSION,D_),n instanceof ag||wn(293)),n}static fromEditor(e){const n=ag.maybeFromEditor(e);return n===void 0&&wn(294),n}constructEditor(){const{$initialEditorState:e,onError:n,...r}=this.buildCreateEditorArgs(),i=Object.assign(pI({...r,...n?{onError:o=>{n(o,i)}}:{}}),{[OT]:this});for(const o of this.sortedExtensionReps())o.build(i);return i}buildEditor(){let e=LT;function n(){try{e()}finally{e=LT}}const r=Object.assign(this.constructEditor(),{dispose:n,[Symbol.dispose]:n});return e=uh(this.registerEditor(r),()=>r.setRootElement(null)),r}hasExtensionByName(e){return this.extensionNameMap.has(e)}getExtensionRep(e){const n=this.extensionNameMap.get(e.name);if(n)return n.extension!==e&&wn(295,e.name),n}addEdge(e,n,r){const i=this.outgoingConfigEdges.get(e);i?i.set(n,r):this.outgoingConfigEdges.set(e,new Map([[n,r]]));const o=this.incomingEdges.get(n);o?o.add(e):this.incomingEdges.set(n,new Set([e]))}addExtension(e){this._sortedExtensionReps!==void 0&&wn(296);const n=Rp(e),[r]=n;typeof r.name!="string"&&wn(297,typeof r.name);let i=this.extensionNameMap.get(r.name);if(i!==void 0&&i.extension!==r&&wn(298,r.name),!i){i=new c7(this,r),this.extensionNameMap.set(r.name,i);const o=this.conflicts.get(r.name);typeof o=="string"&&wn(299,r.name,o);for(const a of r.conflictsWith||[])this.extensionNameMap.has(a)&&wn(299,r.name,a),this.conflicts.set(a,r.name);for(const a of r.dependencies||[]){const s=Rp(a);this.addEdge(r.name,s[0].name,s.slice(1)),this.addExtension(s)}for(const[a,s]of r.peerDependencies||[])this.addEdge(r.name,a,s?[s]:[])}}sortedExtensionReps(){if(this._sortedExtensionReps)return this._sortedExtensionReps;const e=[],n=(r,i)=>{let o=r.state;if(QI(o))return;const a=r.extension.name;var s;M_(o)||wn(300,a,i||"[unknown]"),M_(s=o)||wn(304,String(s.id),String(t1)),o=Object.assign(s,{id:Zy}),r.state=o;const l=this.outgoingConfigEdges.get(a);if(l)for(const u of l.keys()){const d=this.extensionNameMap.get(u);d&&n(d,a)}o=s7(o),r.state=o,e.push(r)};for(const r of this.extensionNameMap.values())M_(r.state)&&n(r);for(const r of e)for(const[i,o]of this.outgoingConfigEdges.get(r.extension.name)||[])if(o.length>0){const a=this.extensionNameMap.get(i);if(a)for(const s of o)a.configs.add(s)}for(const[r,...i]of this.roots)if(i.length>0){const o=this.extensionNameMap.get(r.name);o===void 0&&wn(301,r.name);for(const a of i)o.configs.add(a)}return this._sortedExtensionReps=e,this._sortedExtensionReps}registerEditor(e){const n=this.sortedExtensionReps(),r=new AbortController,i=[()=>r.abort()],o=r.signal;for(const a of n){const s=a.register(e,o);s&&i.push(s)}for(const a of n){const s=a.afterRegistration(e);s&&i.push(s)}return uh(...i)}buildCreateEditorArgs(){const e={},n=new Set,r=new Map,i=new Map,o={},a={},s=this.sortedExtensionReps();for(const d of s){const{extension:f}=d;if(f.onError!==void 0&&(e.onError=f.onError),f.disableEvents!==void 0&&(e.disableEvents=f.disableEvents),f.parentEditor!==void 0&&(e.parentEditor=f.parentEditor),f.editable!==void 0&&(e.editable=f.editable),f.namespace!==void 0&&(e.namespace=f.namespace),f.$initialEditorState!==void 0&&(e.$initialEditorState=f.$initialEditorState),f.nodes)for(const h of a7(f)){if(typeof h!="function"){const p=r.get(h.replace);p&&wn(302,f.name,h.replace.name,p.extension.name),r.set(h.replace,d)}n.add(h)}if(f.html){if(f.html.export)for(const[h,p]of f.html.export.entries())i.set(h,p);f.html.import&&Object.assign(o,f.html.import)}f.theme&&XI(a,f.theme)}Object.keys(a).length>0&&(e.theme=a),n.size&&(e.nodes=[...n]);const l=Object.keys(o).length>0,u=i.size>0;(l||u)&&(e.html={},l&&(e.html.import=o),u&&(e.html.export=i));for(const d of s)d.init(e);return e.onError||(e.onError=f7),e}};function p7(t,e){const n=h7.fromEditor(t).extensionNameMap.get(e);return n?n.getExtensionDependency():void 0}function g7(t){const e=window.location.origin,n=r=>{if(r.origin!==e)return;const i=t.getRootElement();if(document.activeElement!==i)return;const o=r.data;if(typeof o=="string"){let a;try{a=JSON.parse(o)}catch{return}if(a&&a.protocol==="nuanria_messaging"&&a.type==="request"){const s=a.payload;if(s&&s.functionId==="makeChanges"){const l=s.args;if(l){const[u,d,f,h,p]=l;t.update(()=>{const g=Ge();if(De(g)){const m=g.anchor;let v=m.getNode(),b=0,y=0;if(Ye(v)&&u>=0&&d>=0&&(b=u,y=u+d,g.setTextNodeRange(v,b,v,y)),b===y&&f===""||(g.insertRawText(f),v=m.getNode()),Ye(v)){b=h,y=h+p;const w=v.getTextContentSize();b=b>w?w:b,y=y>w?w:y,g.setTextNodeRange(v,b,v,y)}r.stopImmediatePropagation()}})}}}}};return window.addEventListener("message",n,!0),()=>{window.removeEventListener("message",n,!0)}}function m7(t,e,n,r,i){if(t===null||n.size===0&&r.size===0&&!i)return 0;const o=e._selection,a=t._selection;if(i)return 1;if(!(De(o)&&De(a)&&a.isCollapsed()&&o.isCollapsed()))return 0;const s=(function(b,y,w){const x=b._nodeMap,E=[];for(const $ of y){const A=x.get($);A!==void 0&&E.push(A)}for(const[$,A]of w){if(!A)continue;const k=x.get($);k===void 0||ur(k)||E.push(k)}return E})(e,n,r);if(s.length===0)return 0;if(s.length>1){const b=e._nodeMap,y=b.get(o.anchor.key),w=b.get(a.anchor.key);return y&&w&&!t._nodeMap.has(y.__key)&&Ye(y)&&y.__text.length===1&&o.anchor.offset===1?2:0}const l=s[0],u=t._nodeMap.get(l.__key);if(!Ye(u)||!Ye(l)||u.__mode!==l.__mode)return 0;const d=u.__text,f=l.__text;if(d===f)return 0;const h=o.anchor,p=a.anchor;if(h.key!==p.key||h.type!=="text")return 0;const g=h.offset,m=p.offset,v=f.length-d.length;return v===1&&m===g-1?2:v===-1&&m===g+1?3:v===-1&&m===g?4:0}function v7(t,e){let n=Date.now(),r=0;return(i,o,a,s,l,u)=>{const d=Date.now();if(u.has(zy))return r=0,n=d,2;const f=m7(i,o,s,l,t.isComposing()),h=(()=>{const p=a===null||a.editor===t,g=u.has(LK);if(!g&&p&&u.has($f))return 0;if(i===null)return 1;const m=o._selection;if(!(s.size>0||l.size>0))return m!==null?0:2;const v=typeof e=="number"?e:e.peek();return g===!1&&f!==0&&f===r&&d<n+v&&p||s.size===1&&(function(b,y,w){const x=y._nodeMap.get(b),E=w._nodeMap.get(b),$=y._selection,A=w._selection;return!(De($)&&De(A)&&$.anchor.type==="element"&&$.focus.type==="element"&&A.anchor.type==="text"&&A.focus.type==="text"||!Ye(x)||!Ye(E)||x.__parent!==E.__parent)&&JSON.stringify(y.read(()=>x.exportJSON()))===JSON.stringify(w.read(()=>E.exportJSON()))})(Array.from(s)[0],i,o)?0:1})();return n=d,r=f,h}}function IT(t){t.undoStack=[],t.redoStack=[],t.current=null}function eN(t,e,n){const r=v7(t,n);return uh(t.registerCommand(S0,()=>((function(o,a){const s=a.redoStack,l=a.undoStack;if(l.length!==0){const u=a.current,d=l.pop();u!==null&&(s.push(u),o.dispatchCommand(Ep,!0)),l.length===0&&o.dispatchCommand(Tp,!1),a.current=d||null,d&&d.editor.setEditorState(d.editorState,{tag:zy})}})(t,e),!0),jt),t.registerCommand(E0,()=>((function(o,a){const s=a.redoStack,l=a.undoStack;if(s.length!==0){const u=a.current;u!==null&&(l.push(u),o.dispatchCommand(Tp,!0));const d=s.pop();s.length===0&&o.dispatchCommand(Ep,!1),a.current=d||null,d&&d.editor.setEditorState(d.editorState,{tag:zy})}})(t,e),!0),jt),t.registerCommand(TK,()=>(IT(e),!1),jt),t.registerCommand($K,()=>(IT(e),t.dispatchCommand(Ep,!1),t.dispatchCommand(Tp,!1),!0),jt),t.registerUpdateListener(({editorState:o,prevEditorState:a,dirtyLeaves:s,dirtyElements:l,tags:u})=>{const d=e.current,f=e.redoStack,h=e.undoStack,p=d===null?null:d.editorState;if(d!==null&&o===p)return;const g=r(a,o,d,s,l,u);if(g===1)f.length!==0&&(e.redoStack=[],t.dispatchCommand(Ep,!1)),d!==null&&(h.push({...d}),t.dispatchCommand(Tp,!0));else if(g===2)return;e.current={editor:t,editorState:o}}))}function tN(){return{current:null,redoStack:[],undoStack:[]}}const F_={build:(t,{delay:e,createInitialHistoryState:n,disabled:r})=>o7({delay:e,disabled:r,historyState:n(t)}),config:{createInitialHistoryState:tN,delay:300,disabled:typeof window>"u"},name:"@lexical/history/History",register:(t,e,n)=>{const r=n.getOutput();return e1(()=>r.disabled.value?void 0:eN(t,r.historyState.value,r.delay))}};CV(F_,{createInitialHistoryState:()=>{throw new Error("SharedHistory did not inherit parent history")},disabled:!0});const _7=new Set(["http:","https:","mailto:","sms:","tel:"]);let nc=class nN extends ir{__url;__target;__rel;__title;static getType(){return"link"}static clone(e){return new nN(e.__url,{rel:e.__rel,target:e.__target,title:e.__title},e.__key)}constructor(e="",n={},r){super(r);const{target:i=null,rel:o=null,title:a=null}=n;this.__url=e,this.__target=i,this.__rel=o,this.__title=a}createDOM(e){const n=document.createElement("a");return this.updateLinkDOM(null,n,e),Rr(n,e.theme.link),n}updateLinkDOM(e,n,r){if(EI(n)){e&&e.__url===this.__url||(n.href=this.sanitizeUrl(this.__url));for(const i of["target","rel","title"]){const o=`__${i}`,a=this[o];e&&e[o]===a||(a?n[i]=a:n.removeAttribute(i))}}}updateDOM(e,n,r){return this.updateLinkDOM(e,n,r),!1}static importDOM(){return{a:e=>({conversion:b7,priority:1})}}static importJSON(e){return Il().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setURL(e.url).setRel(e.rel||null).setTarget(e.target||null).setTitle(e.title||null)}sanitizeUrl(e){e=MT(e);try{const n=new URL(MT(e));if(!_7.has(n.protocol))return"about:blank"}catch{return e}return e}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),url:this.getURL()}}getURL(){return this.getLatest().__url}setURL(e){const n=this.getWritable();return n.__url=e,n}getTarget(){return this.getLatest().__target}setTarget(e){const n=this.getWritable();return n.__target=e,n}getRel(){return this.getLatest().__rel}setRel(e){const n=this.getWritable();return n.__rel=e,n}getTitle(){return this.getLatest().__title}setTitle(e){const n=this.getWritable();return n.__title=e,n}insertNewAfter(e,n=!0){const r=Il(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(r,n),r}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(e,n,r){if(!De(n))return!1;const i=n.anchor.getNode(),o=n.focus.getNode();return this.isParentOf(i)&&this.isParentOf(o)&&n.getTextContent().length>0}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||this.__url.startsWith("http://")}};function b7(t){let e=null;if(EI(t)){const n=t.textContent;(n!==null&&n!==""||t.children.length>0)&&(e=Il(t.getAttribute("href")||"",{rel:t.getAttribute("rel"),target:t.getAttribute("target"),title:t.getAttribute("title")}))}return{node:e}}function Il(t="",e){return Di(new nc(t,e))}function Ma(t){return t instanceof nc}let rN=class iN extends nc{__isUnlinked;constructor(e="",n={},r){super(e,n,r),this.__isUnlinked=n.isUnlinked!==void 0&&n.isUnlinked!==null&&n.isUnlinked}static getType(){return"autolink"}static clone(e){return new iN(e.__url,{isUnlinked:e.__isUnlinked,rel:e.__rel,target:e.__target,title:e.__title},e.__key)}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(e){const n=this.getWritable();return n.__isUnlinked=e,n}createDOM(e){return this.__isUnlinked?document.createElement("span"):super.createDOM(e)}updateDOM(e,n,r){return super.updateDOM(e,n,r)||e.__isUnlinked!==this.__isUnlinked}static importJSON(e){return NT().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setIsUnlinked(e.isUnlinked||!1)}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),isUnlinked:this.__isUnlinked}}insertNewAfter(e,n=!0){const r=this.getParentOrThrow().insertNewAfter(e,n);if(we(r)){const i=NT(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return r.append(i),i}return null}};function NT(t="",e){return Di(new rN(t,e))}function df(t){return t instanceof rN}const Qy=gt("TOGGLE_LINK_COMMAND");function RT(t,e){if(t.type==="element"){const n=t.getNode();return we(n)||(function(r,...i){const o=new URL("https://lexical.dev/docs/error"),a=new URLSearchParams;a.append("code",r);for(const s of i)a.append("v",s);throw o.search=a.toString(),Error(`Minified Lexical error #${r}; visit ${o.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(252),n.getChildren()[t.offset+e]||null}return null}function y7(t,e={}){let n;if(t&&typeof t=="object"){const{url:d,...f}=t;n=d,e={...f,...e}}else n=t;const{target:r,title:i}=e,o=e.rel===void 0?"noreferrer":e.rel,a=Ge();if(a===null||!De(a)&&!ai(a))return;if(ai(a)){const d=a.getNodes();return d.length===0?void 0:void d.forEach(f=>{if(n===null){const h=pi(f,p=>!df(p)&&Ma(p));h&&(h.insertBefore(f),h.getChildren().length===0&&h.remove())}else{const h=pi(f,p=>!df(p)&&Ma(p));if(h)h.setURL(n),r!==void 0&&h.setTarget(r),o!==void 0&&h.setRel(o);else{const p=Il(n,{rel:o,target:r});f.insertBefore(p),p.append(f)}}})}const s=a.extract();if(n===null){const d=new Set;return void s.forEach(f=>{const h=f.getParent();if(Ma(h)&&!df(h)){const p=h.getKey();if(d.has(p))return;(function(g,m){const v=new Set(m.filter(A=>g.isParentOf(A)).map(A=>A.getKey())),b=g.getChildren(),y=b.filter(A=>v.has(A.getKey()));if(y.length===b.length)return b.forEach(A=>g.insertBefore(A)),void g.remove();const w=b.findIndex(A=>v.has(A.getKey())),x=b.findLastIndex(A=>v.has(A.getKey())),E=w===0,$=x===b.length-1;if(E)y.forEach(A=>g.insertBefore(A));else if($)for(let A=y.length-1;A>=0;A--)g.insertAfter(y[A]);else{for(let k=y.length-1;k>=0;k--)g.insertAfter(y[k]);const A=b.slice(x+1);if(A.length>0){const k=Il(g.getURL(),{rel:g.getRel(),target:g.getTarget(),title:g.getTitle()});y[y.length-1].insertAfter(k),A.forEach(T=>k.append(T))}}})(h,s),d.add(p)}})}const l=new Set,u=d=>{l.has(d.getKey())||(l.add(d.getKey()),d.setURL(n),r!==void 0&&d.setTarget(r),o!==void 0&&d.setRel(o),i!==void 0&&d.setTitle(i))};if(s.length===1){const d=s[0],f=pi(d,Ma);if(f!==null)return u(f)}(function(d){const f=Ge();if(!De(f))return d();const h=Ru(f),p=h.isBackward(),g=RT(h.anchor,p?-1:0),m=RT(h.focus,p?0:-1);if(d(),g||m){const v=Ge();if(De(v)){const b=v.clone();if(g){const y=g.getParent();y&&b.anchor.set(y.getKey(),g.getIndexWithinParent()+(p?1:0),"element")}if(m){const y=m.getParent();y&&b.focus.set(y.getKey(),m.getIndexWithinParent()+(p?0:1),"element")}Br(Ru(b))}}})(()=>{let d=null;for(const f of s){if(!f.isAttached())continue;const h=pi(f,Ma);if(h){u(h);continue}if(we(f)){if(!f.isInline())continue;if(Ma(f)){if(!(df(f)||d!==null&&d.getParentOrThrow().isParentOf(f))){u(f),d=f;continue}for(const g of f.getChildren())f.insertBefore(g);f.remove();continue}}const p=f.getPreviousSibling();Ma(p)&&p.is(d)?p.append(f):(d=Il(n,{rel:o,target:r,title:i}),f.insertAfter(d),d.append(f))}})}const w7=/^\+?[0-9\s()-]{5,}$/;function MT(t){return t.match(/^[a-z][a-z0-9+.-]*:/i)||t.match(/^[/#.]/)?t:t.includes("@")?`mailto:${t}`:w7.test(t)?`tel:${t}`:`https://${t}`}function Ss(t,...e){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",t);for(const i of e)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function x7(t){let e=1,n=t.getParent();for(;n!=null;){if(Sn(n)){const r=n.getParent();if(Ot(r)){e++,n=r.getParent();continue}Ss(40)}return e}return e}function k7(t){let e=t.getParent();Ot(e)||Ss(40);let n=e;for(;n!==null;)n=n.getParent(),Ot(n)&&(e=n);return e}function ia(t){return Sn(t)&&Ot(t.getFirstChild())}function DT(t){return ro().append(t)}function S7(t,e){return Sn(t)&&(e.length===0||e.length===1&&t.is(e[0])&&t.getChildrenSize()===0)}function FT(t){const e=Ge();if(e!==null){let n=e.getNodes();if(De(e)){const i=e.getStartEndPoints();i===null&&Ss(143);const[o]=i,a=o.getNode(),s=a.getParent();if(Yi(a)){const l=a.getFirstChild();if(l)n=l.selectStart().getNodes();else{const u=Tn();a.append(u),n=u.select().getNodes()}}else if(S7(a,n)){const l=Ii(t);if(Yi(s)){a.replace(l);const u=ro();we(a)&&(u.setFormat(a.getFormatType()),u.setIndent(a.getIndent())),l.append(u)}else if(Sn(a)){const u=a.getParentOrThrow();ju(l,u.getChildren()),u.replace(l)}return}}const r=new Set;for(let i=0;i<n.length;i++){const o=n[i];if(we(o)&&o.isEmpty()&&!Sn(o)&&!r.has(o.getKey())){zT(o,t);continue}let a=iV(o)?o.getParent():Sn(o)&&o.isEmpty()?o:null;for(;a!=null;){const s=a.getKey();if(Ot(a)){if(!r.has(s)){const l=Ii(t);ju(l,a.getChildren()),a.replace(l),r.add(s)}break}{const l=a.getParent();if(Yi(l)&&!r.has(s)){r.add(s),zT(a,t);break}a=l}}}}}function ju(t,e){t.splice(t.getChildrenSize(),0,e)}function zT(t,e){if(Ot(t))return t;const n=t.getPreviousSibling(),r=t.getNextSibling(),i=ro();let o;if(ju(i,t.getChildren()),Ot(n)&&e===n.getListType())n.append(i),Ot(r)&&e===r.getListType()&&(ju(n,r.getChildren()),r.remove()),o=n;else if(Ot(r)&&e===r.getListType())r.getFirstChildOrThrow().insertBefore(i),o=r;else{const a=Ii(e);a.append(i),t.replace(a),o=a}return i.setFormat(t.getFormatType()),i.setIndent(t.getIndent()),t.remove(),o}function n1(t,e){const n=t.getLastChild(),r=e.getFirstChild();n&&r&&ia(n)&&ia(r)&&(n1(n.getFirstChild(),r.getFirstChild()),r.remove());const i=e.getChildren();i.length>0&&t.append(...i),e.remove()}function E7(t){const e=t.getListType()!=="check";let n=t.getStart();for(const r of t.getChildren())Sn(r)&&(r.getValue()!==n&&r.setValue(n),e&&r.getLatest().__checked!=null&&r.setChecked(void 0),Ot(r.getFirstChild())||n++)}function T7(t){const e=new Set;if(ia(t)||e.has(t.getKey()))return;const n=t.getParent(),r=t.getNextSibling(),i=t.getPreviousSibling();if(ia(r)&&ia(i)){const o=i.getFirstChild();if(Ot(o)){o.append(t);const a=r.getFirstChild();Ot(a)&&(ju(o,a.getChildren()),r.remove(),e.add(r.getKey()))}}else if(ia(r)){const o=r.getFirstChild();if(Ot(o)){const a=o.getFirstChild();a!==null&&a.insertBefore(t)}}else if(ia(i)){const o=i.getFirstChild();Ot(o)&&o.append(t)}else if(Ot(n)){const o=ro().setTextFormat(t.getTextFormat()).setTextStyle(t.getTextStyle()),a=Ii(n.getListType()).setTextFormat(n.getTextFormat()).setTextStyle(n.getTextStyle());o.append(a),a.append(t),i?i.insertAfter(o):r?r.insertBefore(o):n.append(o)}}function $7(t){if(ia(t))return;const e=t.getParent(),n=e?e.getParent():void 0;if(Ot(n?n.getParent():void 0)&&Sn(n)&&Ot(e)){const r=e?e.getFirstChild():void 0,i=e?e.getLastChild():void 0;if(t.is(r))n.insertBefore(t),e.isEmpty()&&n.remove();else if(t.is(i))n.insertAfter(t),e.isEmpty()&&n.remove();else{const o=e.getListType(),a=ro(),s=Ii(o);a.append(s),t.getPreviousSiblings().forEach(d=>s.append(d));const l=ro(),u=Ii(o);l.append(u),ju(u,t.getNextSiblings()),n.insertBefore(a),n.insertAfter(l),n.replace(t)}}}function A7(){const t=Ge();if(!De(t)||!t.isCollapsed())return!1;const e=t.anchor.getNode();if(!Sn(e)||e.getChildrenSize()!==0)return!1;const n=k7(e),r=e.getParent();Ot(r)||Ss(40);const i=r.getParent();let o;if(Yi(i))o=Tn(),n.insertAfter(o);else{if(!Sn(i))return!1;o=ro(),i.insertAfter(o)}o.setTextStyle(t.style).setTextFormat(t.format).select();const a=e.getNextSiblings();if(a.length>0){const s=Ii(r.getListType());if(Sn(o)){const l=ro();l.append(s),o.insertAfter(l)}else o.insertAfter(s);s.append(...a)}return(function(s){let l=s;for(;l.getNextSibling()==null&&l.getPreviousSibling()==null;){const u=l.getParent();if(u==null||!Sn(u)&&!Ot(u))break;l=u}l.remove()})(e),!0}function Wg(...t){const e=[];for(const n of t)if(n&&typeof n=="string")for(const[r]of n.matchAll(/\S+/g))e.push(r);return e}let Jh=class extends ir{__value;__checked;$config(){return this.config("listitem",{$transform:e=>{if(e.__checked==null)return;const n=e.getParent();Ot(n)&&n.getListType()!=="check"&&e.getChecked()!=null&&e.setChecked(void 0)},extends:ir,importDOM:{li:()=>({conversion:C7,priority:0})}})}constructor(e=1,n=void 0,r){super(r),this.__value=e===void 0?1:e,this.__checked=n}afterCloneFrom(e){super.afterCloneFrom(e),this.__value=e.__value,this.__checked=e.__checked}createDOM(e){const n=document.createElement("li");return this.updateListItemDOM(null,n,e),n}updateListItemDOM(e,n,r){(function(a,s,l){const u=s.getParent();!Ot(u)||u.getListType()!=="check"||Ot(s.getFirstChild())?(a.removeAttribute("role"),a.removeAttribute("tabIndex"),a.removeAttribute("aria-checked")):(a.setAttribute("role","checkbox"),a.setAttribute("tabIndex","-1"),l&&s.__checked===l.__checked||a.setAttribute("aria-checked",s.getChecked()?"true":"false"))})(n,this,e),n.value=this.__value,(function(a,s,l){const u=[],d=[],f=s.list,h=f?f.listitem:void 0;let p;if(f&&f.nested&&(p=f.nested.listitem),h!==void 0&&u.push(...Wg(h)),f){const g=l.getParent(),m=Ot(g)&&g.getListType()==="check",v=l.getChecked();m&&!v||d.push(f.listitemUnchecked),m&&v||d.push(f.listitemChecked),m&&u.push(v?f.listitemChecked:f.listitemUnchecked)}if(p!==void 0){const g=Wg(p);l.getChildren().some(m=>Ot(m))?u.push(...g):d.push(...g)}d.length>0&&Pl(a,...d),u.length>0&&Rr(a,...u)})(n,r.theme,this);const i=e?e.__style:"",o=this.__style;i!==o&&(o===""?n.removeAttribute("style"):n.style.cssText=o),(function(a,s,l){const u=iT(s.__textStyle);for(const d in u)a.style.setProperty(`--listitem-marker-${d}`,u[d]);if(l)for(const d in iT(l.__textStyle))d in u||a.style.removeProperty(`--listitem-marker-${d}`)})(n,this,e)}updateDOM(e,n,r){const i=n;return this.updateListItemDOM(e,i,r),!1}updateFromJSON(e){return super.updateFromJSON(e).setValue(e.value).setChecked(e.checked)}exportDOM(e){const n=this.createDOM(e._config),r=this.getFormatType();r&&(n.style.textAlign=r);const i=this.getDirection();return i&&(n.dir=i),{element:n}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),value:this.getValue()}}append(...e){for(let n=0;n<e.length;n++){const r=e[n];if(we(r)&&this.canMergeWith(r)){const i=r.getChildren();this.append(...i),r.remove()}else super.append(r)}return this}replace(e,n){if(Sn(e))return super.replace(e);this.setIndent(0);const r=this.getParentOrThrow();if(!Ot(r))return e;if(r.__first===this.getKey())r.insertBefore(e);else if(r.__last===this.getKey())r.insertAfter(e);else{const i=Ii(r.getListType());let o=this.getNextSibling();for(;o;){const a=o;o=o.getNextSibling(),i.append(a)}r.insertAfter(e),e.insertAfter(i)}return n&&(we(e)||Ss(139),this.getChildren().forEach(i=>{e.append(i)})),this.remove(),r.getChildrenSize()===0&&r.remove(),e}insertAfter(e,n=!0){const r=this.getParentOrThrow();if(Ot(r)||Ss(39),Sn(e))return super.insertAfter(e,n);const i=this.getNextSiblings();if(r.insertAfter(e,n),i.length!==0){const o=Ii(r.getListType());i.forEach(a=>o.append(a)),e.insertAfter(o,n)}return e}remove(e){const n=this.getPreviousSibling(),r=this.getNextSibling();super.remove(e),n&&r&&ia(n)&&ia(r)&&(n1(n.getFirstChild(),r.getFirstChild()),r.remove())}insertNewAfter(e,n=!0){const r=ro().updateFromJSON(this.exportJSON()).setChecked(!this.getChecked()&&void 0);return this.insertAfter(r,n),r}collapseAtStart(e){const n=Tn();this.getChildren().forEach(a=>n.append(a));const r=this.getParentOrThrow(),i=r.getParentOrThrow(),o=Sn(i);if(r.getChildrenSize()===1)if(o)r.remove(),i.select();else{r.insertBefore(n),r.remove();const a=e.anchor,s=e.focus,l=n.getKey();a.type==="element"&&a.getNode().is(this)&&a.set(l,a.offset,"element"),s.type==="element"&&s.getNode().is(this)&&s.set(l,s.offset,"element")}else r.insertBefore(n),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(e){const n=this.getWritable();return n.__value=e,n}getChecked(){const e=this.getLatest();let n;const r=this.getParent();return Ot(r)&&(n=r.getListType()),n==="check"?!!e.__checked:void 0}setChecked(e){const n=this.getWritable();return n.__checked=e,n}toggleChecked(){const e=this.getWritable();return e.setChecked(!e.__checked)}getIndent(){const e=this.getParent();if(e===null||!this.isAttached())return this.getLatest().__indent;let n=e.getParentOrThrow(),r=0;for(;Sn(n);)n=n.getParentOrThrow().getParentOrThrow(),r++;return r}setIndent(e){typeof e!="number"&&Ss(117),(e=Math.floor(e))>=0||Ss(199);let n=this.getIndent();for(;n!==e;)n<e?(T7(this),n++):($7(this),n--);return this}canInsertAfter(e){return Sn(e)}canReplaceWith(e){return Sn(e)}canMergeWith(e){return Sn(e)||Vh(e)}extractWithChild(e,n){if(!De(n))return!1;const r=n.anchor.getNode(),i=n.focus.getNode();return this.isParentOf(r)&&this.isParentOf(i)&&this.getTextContent().length===n.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return Ii("bullet")}canMergeWhenEmpty(){return!0}};function C7(t){if(t.classList.contains("task-list-item")){for(const n of t.children)if(n.tagName==="INPUT")return jT(n)}if(t.classList.contains("joplin-checkbox")){for(const n of t.children)if(n.classList.contains("checkbox-wrapper")&&n.children.length>0&&n.children[0].tagName==="INPUT")return jT(n.children[0])}const e=t.getAttribute("aria-checked");return{node:ro(e==="true"||e!=="false"&&void 0)}}function jT(t){return t.getAttribute("type")!=="checkbox"?{node:null}:{node:ro(t.hasAttribute("checked"))}}function ro(t){return Di(new Jh(void 0,t))}function Sn(t){return t instanceof Jh}let Ed=class extends ir{__tag;__start;__listType;$config(){return this.config("list",{$transform:e=>{(function(n){const r=n.getNextSibling();Ot(r)&&n.getListType()===r.getListType()&&n1(n,r)})(e),E7(e)},extends:ir,importDOM:{ol:()=>({conversion:BT,priority:0}),ul:()=>({conversion:BT,priority:0})}})}constructor(e="number",n=1,r){super(r);const i=O7[e]||e;this.__listType=i,this.__tag=i==="number"?"ol":"ul",this.__start=n}afterCloneFrom(e){super.afterCloneFrom(e),this.__listType=e.__listType,this.__tag=e.__tag,this.__start=e.__start}getTag(){return this.getLatest().__tag}setListType(e){const n=this.getWritable();return n.__listType=e,n.__tag=e==="number"?"ol":"ul",n}getListType(){return this.getLatest().__listType}getStart(){return this.getLatest().__start}setStart(e){const n=this.getWritable();return n.__start=e,n}createDOM(e,n){const r=this.__tag,i=document.createElement(r);return this.__start!==1&&i.setAttribute("start",String(this.__start)),i.__lexicalListType=this.__listType,UT(i,e.theme,this),i}updateDOM(e,n,r){return e.__tag!==this.__tag||e.__listType!==this.__listType||(UT(n,r.theme,this),!1)}updateFromJSON(e){return super.updateFromJSON(e).setListType(e.listType).setStart(e.start)}exportDOM(e){const n=this.createDOM(e._config,e);return In(n)&&(this.__start!==1&&n.setAttribute("start",String(this.__start)),this.__listType==="check"&&n.setAttribute("__lexicalListType","check")),{element:n}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag()}}canBeEmpty(){return!1}canIndent(){return!1}splice(e,n,r){let i=r;for(let o=0;o<r.length;o++){const a=r[o];Sn(a)||(i===r&&(i=[...r]),i[o]=ro().append(!we(a)||Ot(a)||a.isInline()?a:zn(a.getTextContent())))}return super.splice(e,n,i)}extractWithChild(e){return Sn(e)}};function UT(t,e,n){const r=[],i=[],o=e.list;if(o!==void 0){const a=o[`${n.__tag}Depth`]||[],s=x7(n)-1,l=s%a.length,u=a[l],d=o[n.__tag];let f;const h=o.nested,p=o.checklist;if(h!==void 0&&h.list&&(f=h.list),d!==void 0&&r.push(d),p!==void 0&&n.__listType==="check"&&r.push(p),u!==void 0){r.push(...Wg(u));for(let g=0;g<a.length;g++)g!==l&&i.push(n.__tag+g)}if(f!==void 0){const g=Wg(f);s>1?r.push(...g):i.push(...g)}}i.length>0&&Pl(t,...i),r.length>0&&Rr(t,...r)}function P7(t){const e=[];for(let n=0;n<t.length;n++){const r=t[n];if(Sn(r)){e.push(r);const i=r.getChildren();i.length>1&&i.forEach(o=>{Ot(o)&&e.push(DT(o))})}else e.push(DT(r))}return e}function BT(t){const e=t.nodeName.toLowerCase();let n=null;return e==="ol"?n=Ii("number",t.start):e==="ul"&&(n=(function(r){if(r.getAttribute("__lexicallisttype")==="check"||r.classList.contains("contains-task-list")||r.getAttribute("data-is-checklist")==="1")return!0;for(const i of r.childNodes)if(In(i)&&i.hasAttribute("aria-checked"))return!0;return!1})(t)?Ii("check"):Ii("bullet")),{after:P7,node:n}}const O7={ol:"number",ul:"bullet"};function Ii(t="number",e=1){return Di(new Ed(t,e))}function Ot(t){return t instanceof Ed}const oN=gt("INSERT_UNORDERED_LIST_COMMAND"),aN=gt("INSERT_ORDERED_LIST_COMMAND");function L7(t,e){const n=mI(e)?e.body.childNodes:e.childNodes;let r=[];const i=[];for(const o of n)if(!lN.has(o.nodeName)){const a=cN(o,t,i,!1);a!==null&&(r=r.concat(a))}return(function(o){for(const a of o)a.getNextSibling()instanceof I0&&a.insertAfter(no());for(const a of o){const s=a.getChildren();for(const l of s)a.insertBefore(l);a.remove()}})(i),r}function I7(t,e){if(typeof document>"u"||typeof window>"u"&&global.window===void 0)throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");const n=document.createElement("div"),r=ar().getChildren();for(let i=0;i<r.length;i++)sN(t,r[i],n,e);return n.innerHTML}function sN(t,e,n,r=null){let i=r===null||e.isSelected(r);const o=we(e)&&e.excludeFromCopy("html");let a=e;r!==null&&Ye(e)&&(a=NI(r,e,"clone"));const s=we(a)?a.getChildren():[],l=R0(t,a.getType());let u;u=l&&l.exportDOM!==void 0?l.exportDOM(t,a):a.exportDOM(t);const{element:d,after:f}=u;if(!d)return!1;const h=document.createDocumentFragment();for(let p=0;p<s.length;p++){const g=s[p],m=sN(t,g,h,r);!i&&we(e)&&m&&e.extractWithChild(g,r,"html")&&(i=!0)}if(i&&!o){if((In(d)||Vy(d))&&d.append(h),n.append(d),f){const p=f.call(a,d);p&&(Vy(d)?d.replaceChildren(p):d.replaceWith(p))}}else n.append(h);return i}const lN=new Set(["STYLE","SCRIPT"]);function cN(t,e,n,r,i=new Map,o){let a=[];if(lN.has(t.nodeName))return a;let s=null;const l=(function(g,m){const{nodeName:v}=g,b=m._htmlConversions.get(v.toLowerCase());let y=null;if(b!==void 0)for(const w of b){const x=w(g);x!==null&&(y===null||(y.priority||0)<=(x.priority||0))&&(y=x)}return y!==null?y.conversion:null})(t,e),u=l?l(t):null;let d=null;if(u!==null){d=u.after;const g=u.node;if(s=Array.isArray(g)?g[g.length-1]:g,s!==null){for(const[,m]of i)if(s=m(s,o),!s)break;s&&a.push(...Array.isArray(g)?g:[s])}u.forChild!=null&&i.set(t.nodeName,u.forChild)}const f=t.childNodes;let h=[];const p=(s==null||!Yi(s))&&(s!=null&&Uy(s)||r);for(let g=0;g<f.length;g++)h.push(...cN(f[g],e,n,p,new Map(i),s));return d!=null&&(h=d(h)),Gg(t)&&(h=N7(t,h,p?()=>{const g=new I0;return n.push(g),g}:Tn)),s==null?h.length>0?a=a.concat(h):Gg(t)&&(function(g){return g.nextSibling==null||g.previousSibling==null?!1:Gy(g.nextSibling)&&Gy(g.previousSibling)})(t)&&(a=a.concat(no())):we(s)&&s.append(...h),a}function N7(t,e,n){const r=t.style.textAlign,i=[];let o=[];for(let a=0;a<e.length;a++){const s=e[a];if(Uy(s))r&&!s.getFormat()&&s.setFormat(r),i.push(s);else if(o.push(s),a===e.length-1||a<e.length-1&&Uy(e[a+1])){const l=n();l.setFormat(r),l.append(...o),i.push(l),o=[]}}return i}function Yg(t,...e){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",t);for(const i of e)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function R7(t,e=Ge()){return e==null&&Yg(166),De(e)&&e.isCollapsed()||e.getNodes().length===0?"":I7(t,e)}function M7(t,e=Ge()){return e==null&&Yg(166),De(e)&&e.isCollapsed()||e.getNodes().length===0?null:JSON.stringify(D7(t,e))}function qT(t,e,n){const r=t.getData("application/x-lexical-editor");if(r)try{const s=JSON.parse(r);if(s.namespace===n._config.namespace&&Array.isArray(s.nodes))return HT(n,F7(s.nodes),e)}catch(s){console.error(s)}const i=t.getData("text/html"),o=t.getData("text/plain");if(i&&o!==i)try{const s=new DOMParser().parseFromString((function(l){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy("lexical",{createHTML:u=>u}).createHTML(l):l})(i),"text/html");return HT(n,L7(n,s),e)}catch(s){console.error(s)}const a=o||t.getData("text/uri-list");if(a!=null)if(De(e)){const s=a.split(/(\r?\n|\t)/);s[s.length-1]===""&&s.pop();for(let l=0;l<s.length;l++){const u=Ge();if(De(u)){const d=s[l];d===`
|
|
391
|
+
`){const i=Do(),o=no(),a=e.isBackward()?"previous":"next";return e.insertNodes([i,o]),CI(X0(Qa(Bs(i,"next",0),Lo(Cr(o,"next"))),a)),!0}for(let i=0;i<r;i++){const o=n[i];if(o.length>0){let a=o[0];if(i===0&&(a=Ll(a)),t===Os){const s=Do();if(a.insertBefore(s),i===0){const l=e.isBackward()?"focus":"anchor",u=Ri(a.getKey(),0,"text");e[l].is(u)&&e[l].set(s.getKey(),0,"text")}}else hi(a)&&a.remove()}}return!0}function ET(t,e){const n=Ge();if(!De(n))return!1;const{anchor:r,focus:i}=n,o=r.offset,a=i.offset,s=r.getNode(),l=i.getNode(),u=t===Mu;if(!yl(n)||!Qn(s)&&!hi(s)||!Qn(l)&&!hi(l))return!1;if(!e.altKey){if(n.isCollapsed()){const b=s.getParentOrThrow();if(u&&o===0&&s.getPreviousSibling()===null){if(b.getPreviousSibling()===null)return b.selectPrevious(),e.preventDefault(),!0}else if(!u&&o===s.getTextContentSize()&&s.getNextSibling()===null&&b.getNextSibling()===null)return b.selectNext(),e.preventDefault(),!0}return!1}let d,f;if(s.isBefore(l)?(d=Ll(s),f=lu(l)):(d=Ll(l),f=lu(s)),d==null||f==null)return!1;const h=d.getNodesBetween(f);for(let b=0;b<h.length;b++){const y=h[b];if(!Qn(y)&&!hi(y)&&!Bn(y))return!1}e.preventDefault(),e.stopPropagation();const p=u?d.getPreviousSibling():f.getNextSibling();if(!Bn(p))return!0;const g=u?p.getPreviousSibling():p.getNextSibling();if(g==null)return!0;const m=Qn(g)||hi(g)||Bn(g)?u?Ll(g):lu(g):null;let v=m??g;return p.remove(),h.forEach(b=>b.remove()),t===Mu?(h.forEach(b=>v.insertBefore(b)),v.insertBefore(p)):(v.insertAfter(p),v=p,h.forEach(b=>{v.insertAfter(b),v=b})),n.setTextNodeRange(s,o,l,a),!0}function TT(t,e){const n=Ge();if(!De(n))return!1;const{anchor:r,focus:i}=n,o=r.getNode(),a=i.getNode(),s=t===Fg;if(!yl(n)||!Qn(o)&&!hi(o)||!Qn(a)&&!hi(a))return!1;const l=a;if(Y9(l)==="rtl"?!s:s){const u=J9(l,i.offset);if(u!==null){const{node:d,offset:f}=u;Bn(d)?d.selectNext(0,0):n.setTextNodeRange(d,f,d,f)}else l.getParentOrThrow().selectStart()}else X9(l).select();return e.preventDefault(),e.stopPropagation(),!0}function e7(t,e){if(!t.hasNodes([Ol,dh]))throw new Error("CodeHighlightPlugin: CodeNode or CodeHighlightNode not registered on editor");e==null&&(e=KI);const n=[];return t._headless!==!0&&n.push(t.registerMutationListener(Ol,r=>{t.getEditorState().read(()=>{for(const[i,o]of r)if(o!=="destroyed"){const a=qn(i);a!==null&&Q9(a,t)}})},{skipInitialization:!1})),n.push(t.registerNodeTransform(Ol,r=>VI(r,t,e)),t.registerNodeTransform(cs,r=>xT(r,t,e)),t.registerNodeTransform(dh,r=>xT(r,t,e)),t.registerCommand(T0,r=>{const i=(function(o){const a=Ge();if(!De(a)||!yl(a))return null;const s=o?_l:Os,l=o?_l:Ly,u=a.anchor,d=a.focus;if(u.is(d))return l;const f=GI(a);if(f.length!==1)return s;const h=f[0];let p,g;h.length===0&&dv(285),a.isBackward()?(p=d,g=u):(p=u,g=d);const m=Ll(h[0]),v=lu(h[0]),b=Ri(m.getKey(),0,"text"),y=Ri(v.getKey(),v.getTextContentSize(),"text");return p.isBefore(b)||y.isBefore(g)?s:b.isBefore(p)||g.isBefore(y)?l:s})(r.shiftKey);return i!==null&&(r.preventDefault(),t.dispatchCommand(i,void 0),!0)},hs),t.registerCommand(Ly,()=>!!yl(Ge())&&(yd([Do()]),!0),hs),t.registerCommand(Os,r=>ST(Os),hs),t.registerCommand(_l,r=>ST(_l),hs),t.registerCommand(Mu,r=>{const i=Ge();if(!De(i))return!1;const{anchor:o}=i,a=o.getNode();return!!yl(i)&&(i.isCollapsed()&&o.offset===0&&a.getPreviousSibling()===null&&bi(a.getParentOrThrow())?(r.preventDefault(),!0):ET(Mu,r))},hs),t.registerCommand(zg,r=>{const i=Ge();if(!De(i))return!1;const{anchor:o}=i,a=o.getNode();return!!yl(i)&&(i.isCollapsed()&&o.offset===a.getTextContentSize()&&a.getNextSibling()===null&&bi(a.getParentOrThrow())?(r.preventDefault(),!0):ET(zg,r))},hs),t.registerCommand(Fg,r=>TT(Fg,r),hs),t.registerCommand(Oy,r=>TT(Oy,r),hs)),uh(...n)}const t7=Symbol.for("preact-signals");function fv(){if(Ns>1)return void Ns--;let t,e=!1;for(;Of!==void 0;){let n=Of;for(Of=void 0,Xy++;n!==void 0;){const r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&WI(n))try{n.c()}catch(i){e||(t=i,e=!0)}n=r}}if(Xy=0,Ns--,e)throw t}function n7(t){if(Ns>0)return t();Ns++;try{return t()}finally{fv()}}let rn,Of;function $T(t){const e=rn;rn=void 0;try{return t()}finally{rn=e}}let Ns=0,Xy=0,og=0;function AT(t){if(rn===void 0)return;let e=t.n;return e===void 0||e.t!==rn?(e={i:0,S:t,p:rn.s,n:void 0,t:rn,e:void 0,x:void 0,r:e},rn.s!==void 0&&(rn.s.n=e),rn.s=e,t.n=e,32&rn.f&&t.S(e),e):e.i===-1?(e.i=0,e.n!==void 0&&(e.n.p=e.p,e.p!==void 0&&(e.p.n=e.n),e.p=rn.s,e.n=void 0,rn.s.n=e,rn.s=e),e):void 0}function ii(t,e){this.v=t,this.i=0,this.n=void 0,this.t=void 0,this.W=e?.watched,this.Z=e?.unwatched,this.name=e?.name}function r7(t,e){return new ii(t,e)}function WI(t){for(let e=t.s;e!==void 0;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function CT(t){for(let e=t.s;e!==void 0;e=e.n){const n=e.S.n;if(n!==void 0&&(e.r=n),e.S.n=e,e.i=-1,e.n===void 0){t.s=e;break}}}function YI(t){let e,n=t.s;for(;n!==void 0;){const r=n.p;n.i===-1?(n.S.U(n),r!==void 0&&(r.n=n.n),n.n!==void 0&&(n.n.p=r)):e=n,n.S.n=n.r,n.r!==void 0&&(n.r=void 0),n=r}t.s=e}function Dc(t,e){ii.call(this,void 0),this.x=t,this.s=void 0,this.g=og-1,this.f=4,this.W=e?.watched,this.Z=e?.unwatched,this.name=e?.name}function JI(t){const e=t.u;if(t.u=void 0,typeof e=="function"){Ns++;const n=rn;rn=void 0;try{e()}catch(r){throw t.f&=-2,t.f|=8,Q0(t),r}finally{rn=n,fv()}}}function Q0(t){for(let e=t.s;e!==void 0;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,JI(t)}function i7(t){if(rn!==this)throw new Error("Out-of-order effect");YI(this),rn=t,this.f&=-2,8&this.f&&Q0(this),fv()}function Vc(t,e){this.x=t,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32,this.name=e?.name}function e1(t,e){const n=new Vc(t,e);try{n.c()}catch(i){throw n.d(),i}const r=n.d.bind(n);return r[Symbol.dispose]=r,r}function o7(t,e={}){const n={};for(const r in t){const i=e[r],o=r7(i===void 0?t[r]:i);n[r]=o}return n}ii.prototype.brand=t7,ii.prototype.h=function(){return!0},ii.prototype.S=function(t){const e=this.t;e!==t&&t.e===void 0&&(t.x=e,this.t=t,e!==void 0?e.e=t:$T(()=>{var n;(n=this.W)==null||n.call(this)}))},ii.prototype.U=function(t){if(this.t!==void 0){const e=t.e,n=t.x;e!==void 0&&(e.x=n,t.e=void 0),n!==void 0&&(n.e=e,t.x=void 0),t===this.t&&(this.t=n,n===void 0&&$T(()=>{var r;(r=this.Z)==null||r.call(this)}))}},ii.prototype.subscribe=function(t){return e1(()=>{const e=this.value,n=rn;rn=void 0;try{t(e)}finally{rn=n}},{name:"sub"})},ii.prototype.valueOf=function(){return this.value},ii.prototype.toString=function(){return this.value+""},ii.prototype.toJSON=function(){return this.value},ii.prototype.peek=function(){const t=rn;rn=void 0;try{return this.value}finally{rn=t}},Object.defineProperty(ii.prototype,"value",{get(){const t=AT(this);return t!==void 0&&(t.i=this.i),this.v},set(t){if(t!==this.v){if(Xy>100)throw new Error("Cycle detected");this.v=t,this.i++,og++,Ns++;try{for(let e=this.t;e!==void 0;e=e.x)e.t.N()}finally{fv()}}}}),Dc.prototype=new ii,Dc.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===og))return!0;if(this.g=og,this.f|=1,this.i>0&&!WI(this))return this.f&=-2,!0;const t=rn;try{CT(this),rn=this;const e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return rn=t,YI(this),this.f&=-2,!0},Dc.prototype.S=function(t){if(this.t===void 0){this.f|=36;for(let e=this.s;e!==void 0;e=e.n)e.S.S(e)}ii.prototype.S.call(this,t)},Dc.prototype.U=function(t){if(this.t!==void 0&&(ii.prototype.U.call(this,t),this.t===void 0)){this.f&=-33;for(let e=this.s;e!==void 0;e=e.n)e.S.U(e)}},Dc.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(let t=this.t;t!==void 0;t=t.x)t.t.N()}},Object.defineProperty(Dc.prototype,"value",{get(){if(1&this.f)throw new Error("Cycle detected");const t=AT(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}}),Vc.prototype.c=function(){const t=this.S();try{if(8&this.f||this.x===void 0)return;const e=this.x();typeof e=="function"&&(this.u=e)}finally{t()}},Vc.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,JI(this),CT(this),Ns++;const t=rn;return rn=this,i7.bind(this,t)},Vc.prototype.N=function(){2&this.f||(this.f|=2,this.o=Of,Of=this)},Vc.prototype.d=function(){this.f|=8,1&this.f||Q0(this)},Vc.prototype.dispose=function(){this.d()};function a7(t){return(typeof t.nodes=="function"?t.nodes():t.nodes)||[]}function wn(t,...e){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",t);for(const i of e)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function XI(t,e){if(t&&e&&!Array.isArray(e)&&typeof t=="object"&&typeof e=="object"){const n=t,r=e;for(const i in r)n[i]=XI(n[i],r[i]);return t}return e}const t1=0,Zy=1,ZI=2,N_=3,Np=4,Fc=5,R_=6,Kd=7;function M_(t){return t.id===t1}function QI(t){return t.id===ZI}function s7(t){return(function(e){return e.id===Zy})(t)||wn(305,String(t.id),String(Zy)),Object.assign(t,{id:ZI})}const l7=new Set;let c7=class{builder;configs;_dependency;_peerNameSet;extension;state;_signal;constructor(e,n){this.builder=e,this.extension=n,this.configs=new Set,this.state={id:t1}}mergeConfigs(){let e=this.extension.config||{};const n=this.extension.mergeConfig?this.extension.mergeConfig.bind(this.extension):P9;for(const r of this.configs)e=n(e,r);return e}init(e){const n=this.state;QI(n)||wn(306,String(n.id));const r={getDependency:this.getInitDependency.bind(this),getDirectDependentNames:this.getDirectDependentNames.bind(this),getPeer:this.getInitPeer.bind(this),getPeerNameSet:this.getPeerNameSet.bind(this)},i={...r,getDependency:this.getDependency.bind(this),getInitResult:this.getInitResult.bind(this),getPeer:this.getPeer.bind(this)},o=(function(s,l,u){return Object.assign(s,{config:l,id:N_,registerState:u})})(n,this.mergeConfigs(),r);let a;this.state=o,this.extension.init&&(a=this.extension.init(e,o.config,r)),this.state=(function(s,l,u){return Object.assign(s,{id:Np,initResult:l,registerState:u})})(o,a,i)}build(e){const n=this.state;let r;n.id!==Np&&wn(307,String(n.id),String(Fc)),this.extension.build&&(r=this.extension.build(e,n.config,n.registerState));const i={...n.registerState,getOutput:()=>r,getSignal:this.getSignal.bind(this)};this.state=(function(o,a,s){return Object.assign(o,{id:Fc,output:a,registerState:s})})(n,r,i)}register(e,n){this._signal=n;const r=this.state;r.id!==Fc&&wn(308,String(r.id),String(Fc));const i=this.extension.register&&this.extension.register(e,r.config,r.registerState);return this.state=(function(o){return Object.assign(o,{id:R_})})(r),()=>{const o=this.state;o.id!==Kd&&wn(309,String(r.id),String(Kd)),this.state=(function(a){return Object.assign(a,{id:Fc})})(o),i&&i()}}afterRegistration(e){const n=this.state;let r;return n.id!==R_&&wn(310,String(n.id),String(R_)),this.extension.afterRegistration&&(r=this.extension.afterRegistration(e,n.config,n.registerState)),this.state=(function(i){return Object.assign(i,{id:Kd})})(n),r}getSignal(){return this._signal===void 0&&wn(311),this._signal}getInitResult(){this.extension.init===void 0&&wn(312,this.extension.name);const e=this.state;return(function(n){return n.id>=Np})(e)||wn(313,String(e.id),String(Np)),e.initResult}getInitPeer(e){const n=this.builder.extensionNameMap.get(e);return n?n.getExtensionInitDependency():void 0}getExtensionInitDependency(){const e=this.state;return(function(n){return n.id>=N_})(e)||wn(314,String(e.id),String(N_)),{config:e.config}}getPeer(e){const n=this.builder.extensionNameMap.get(e);return n?n.getExtensionDependency():void 0}getInitDependency(e){const n=this.builder.getExtensionRep(e);return n===void 0&&wn(315,this.extension.name,e.name),n.getExtensionInitDependency()}getDependency(e){const n=this.builder.getExtensionRep(e);return n===void 0&&wn(315,this.extension.name,e.name),n.getExtensionDependency()}getState(){const e=this.state;return(function(n){return n.id>=Kd})(e)||wn(316,String(e.id),String(Kd)),e}getDirectDependentNames(){return this.builder.incomingEdges.get(this.extension.name)||l7}getPeerNameSet(){let e=this._peerNameSet;return e||(e=new Set((this.extension.peerDependencies||[]).map(([n])=>n)),this._peerNameSet=e),e}getExtensionDependency(){if(!this._dependency){const e=this.state;(function(n){return n.id>=Fc})(e)||wn(317,this.extension.name),this._dependency={config:e.config,init:e.initResult,output:e.output}}return this._dependency}};const PT={tag:$f};function u7(){const t=ar();t.isEmpty()&&t.append(Tn())}const d7={config:{setOptions:PT,updateOptions:PT},init:({$initialEditorState:t=u7})=>({$initialEditorState:t,initialized:!1}),afterRegistration(t,{updateOptions:e,setOptions:n},r){const i=r.getInitResult();if(!i.initialized){i.initialized=!0;const{$initialEditorState:o}=i;if(XV(o))t.setEditorState(o,n);else if(typeof o=="function")t.update(()=>{o(t)},e);else if(o&&(typeof o=="string"||typeof o=="object")){const a=t.parseEditorState(o);t.setEditorState(a,n)}}return()=>{}},name:"@lexical/extension/InitialState",nodes:[wd,cs,_d,bd,xd]},OT=Symbol.for("@lexical/extension/LexicalBuilder");function LT(){}function f7(t){throw t}function Rp(t){return Array.isArray(t)?t:[t]}const D_="0.38.2+prod.esm";let h7=class ag{roots;extensionNameMap;outgoingConfigEdges;incomingEdges;conflicts;_sortedExtensionReps;PACKAGE_VERSION;constructor(e){this.outgoingConfigEdges=new Map,this.incomingEdges=new Map,this.extensionNameMap=new Map,this.conflicts=new Map,this.PACKAGE_VERSION=D_,this.roots=e;for(const n of e)this.addExtension(n)}static fromExtensions(e){const n=[Rp(d7)];for(const r of e)n.push(Rp(r));return new ag(n)}static maybeFromEditor(e){const n=e[OT];return n&&(n.PACKAGE_VERSION!==D_&&wn(292,n.PACKAGE_VERSION,D_),n instanceof ag||wn(293)),n}static fromEditor(e){const n=ag.maybeFromEditor(e);return n===void 0&&wn(294),n}constructEditor(){const{$initialEditorState:e,onError:n,...r}=this.buildCreateEditorArgs(),i=Object.assign(pI({...r,...n?{onError:o=>{n(o,i)}}:{}}),{[OT]:this});for(const o of this.sortedExtensionReps())o.build(i);return i}buildEditor(){let e=LT;function n(){try{e()}finally{e=LT}}const r=Object.assign(this.constructEditor(),{dispose:n,[Symbol.dispose]:n});return e=uh(this.registerEditor(r),()=>r.setRootElement(null)),r}hasExtensionByName(e){return this.extensionNameMap.has(e)}getExtensionRep(e){const n=this.extensionNameMap.get(e.name);if(n)return n.extension!==e&&wn(295,e.name),n}addEdge(e,n,r){const i=this.outgoingConfigEdges.get(e);i?i.set(n,r):this.outgoingConfigEdges.set(e,new Map([[n,r]]));const o=this.incomingEdges.get(n);o?o.add(e):this.incomingEdges.set(n,new Set([e]))}addExtension(e){this._sortedExtensionReps!==void 0&&wn(296);const n=Rp(e),[r]=n;typeof r.name!="string"&&wn(297,typeof r.name);let i=this.extensionNameMap.get(r.name);if(i!==void 0&&i.extension!==r&&wn(298,r.name),!i){i=new c7(this,r),this.extensionNameMap.set(r.name,i);const o=this.conflicts.get(r.name);typeof o=="string"&&wn(299,r.name,o);for(const a of r.conflictsWith||[])this.extensionNameMap.has(a)&&wn(299,r.name,a),this.conflicts.set(a,r.name);for(const a of r.dependencies||[]){const s=Rp(a);this.addEdge(r.name,s[0].name,s.slice(1)),this.addExtension(s)}for(const[a,s]of r.peerDependencies||[])this.addEdge(r.name,a,s?[s]:[])}}sortedExtensionReps(){if(this._sortedExtensionReps)return this._sortedExtensionReps;const e=[],n=(r,i)=>{let o=r.state;if(QI(o))return;const a=r.extension.name;var s;M_(o)||wn(300,a,i||"[unknown]"),M_(s=o)||wn(304,String(s.id),String(t1)),o=Object.assign(s,{id:Zy}),r.state=o;const l=this.outgoingConfigEdges.get(a);if(l)for(const u of l.keys()){const d=this.extensionNameMap.get(u);d&&n(d,a)}o=s7(o),r.state=o,e.push(r)};for(const r of this.extensionNameMap.values())M_(r.state)&&n(r);for(const r of e)for(const[i,o]of this.outgoingConfigEdges.get(r.extension.name)||[])if(o.length>0){const a=this.extensionNameMap.get(i);if(a)for(const s of o)a.configs.add(s)}for(const[r,...i]of this.roots)if(i.length>0){const o=this.extensionNameMap.get(r.name);o===void 0&&wn(301,r.name);for(const a of i)o.configs.add(a)}return this._sortedExtensionReps=e,this._sortedExtensionReps}registerEditor(e){const n=this.sortedExtensionReps(),r=new AbortController,i=[()=>r.abort()],o=r.signal;for(const a of n){const s=a.register(e,o);s&&i.push(s)}for(const a of n){const s=a.afterRegistration(e);s&&i.push(s)}return uh(...i)}buildCreateEditorArgs(){const e={},n=new Set,r=new Map,i=new Map,o={},a={},s=this.sortedExtensionReps();for(const d of s){const{extension:f}=d;if(f.onError!==void 0&&(e.onError=f.onError),f.disableEvents!==void 0&&(e.disableEvents=f.disableEvents),f.parentEditor!==void 0&&(e.parentEditor=f.parentEditor),f.editable!==void 0&&(e.editable=f.editable),f.namespace!==void 0&&(e.namespace=f.namespace),f.$initialEditorState!==void 0&&(e.$initialEditorState=f.$initialEditorState),f.nodes)for(const h of a7(f)){if(typeof h!="function"){const p=r.get(h.replace);p&&wn(302,f.name,h.replace.name,p.extension.name),r.set(h.replace,d)}n.add(h)}if(f.html){if(f.html.export)for(const[h,p]of f.html.export.entries())i.set(h,p);f.html.import&&Object.assign(o,f.html.import)}f.theme&&XI(a,f.theme)}Object.keys(a).length>0&&(e.theme=a),n.size&&(e.nodes=[...n]);const l=Object.keys(o).length>0,u=i.size>0;(l||u)&&(e.html={},l&&(e.html.import=o),u&&(e.html.export=i));for(const d of s)d.init(e);return e.onError||(e.onError=f7),e}};function p7(t,e){const n=h7.fromEditor(t).extensionNameMap.get(e);return n?n.getExtensionDependency():void 0}function g7(t){const e=window.location.origin,n=r=>{if(r.origin!==e)return;const i=t.getRootElement();if(document.activeElement!==i)return;const o=r.data;if(typeof o=="string"){let a;try{a=JSON.parse(o)}catch{return}if(a&&a.protocol==="nuanria_messaging"&&a.type==="request"){const s=a.payload;if(s&&s.functionId==="makeChanges"){const l=s.args;if(l){const[u,d,f,h,p]=l;t.update(()=>{const g=Ge();if(De(g)){const m=g.anchor;let v=m.getNode(),b=0,y=0;if(Ye(v)&&u>=0&&d>=0&&(b=u,y=u+d,g.setTextNodeRange(v,b,v,y)),b===y&&f===""||(g.insertRawText(f),v=m.getNode()),Ye(v)){b=h,y=h+p;const w=v.getTextContentSize();b=b>w?w:b,y=y>w?w:y,g.setTextNodeRange(v,b,v,y)}r.stopImmediatePropagation()}})}}}}};return window.addEventListener("message",n,!0),()=>{window.removeEventListener("message",n,!0)}}function m7(t,e,n,r,i){if(t===null||n.size===0&&r.size===0&&!i)return 0;const o=e._selection,a=t._selection;if(i)return 1;if(!(De(o)&&De(a)&&a.isCollapsed()&&o.isCollapsed()))return 0;const s=(function(b,y,w){const x=b._nodeMap,E=[];for(const $ of y){const A=x.get($);A!==void 0&&E.push(A)}for(const[$,A]of w){if(!A)continue;const k=x.get($);k===void 0||ur(k)||E.push(k)}return E})(e,n,r);if(s.length===0)return 0;if(s.length>1){const b=e._nodeMap,y=b.get(o.anchor.key),w=b.get(a.anchor.key);return y&&w&&!t._nodeMap.has(y.__key)&&Ye(y)&&y.__text.length===1&&o.anchor.offset===1?2:0}const l=s[0],u=t._nodeMap.get(l.__key);if(!Ye(u)||!Ye(l)||u.__mode!==l.__mode)return 0;const d=u.__text,f=l.__text;if(d===f)return 0;const h=o.anchor,p=a.anchor;if(h.key!==p.key||h.type!=="text")return 0;const g=h.offset,m=p.offset,v=f.length-d.length;return v===1&&m===g-1?2:v===-1&&m===g+1?3:v===-1&&m===g?4:0}function v7(t,e){let n=Date.now(),r=0;return(i,o,a,s,l,u)=>{const d=Date.now();if(u.has(zy))return r=0,n=d,2;const f=m7(i,o,s,l,t.isComposing()),h=(()=>{const p=a===null||a.editor===t,g=u.has(LV);if(!g&&p&&u.has($f))return 0;if(i===null)return 1;const m=o._selection;if(!(s.size>0||l.size>0))return m!==null?0:2;const v=typeof e=="number"?e:e.peek();return g===!1&&f!==0&&f===r&&d<n+v&&p||s.size===1&&(function(b,y,w){const x=y._nodeMap.get(b),E=w._nodeMap.get(b),$=y._selection,A=w._selection;return!(De($)&&De(A)&&$.anchor.type==="element"&&$.focus.type==="element"&&A.anchor.type==="text"&&A.focus.type==="text"||!Ye(x)||!Ye(E)||x.__parent!==E.__parent)&&JSON.stringify(y.read(()=>x.exportJSON()))===JSON.stringify(w.read(()=>E.exportJSON()))})(Array.from(s)[0],i,o)?0:1})();return n=d,r=f,h}}function IT(t){t.undoStack=[],t.redoStack=[],t.current=null}function eN(t,e,n){const r=v7(t,n);return uh(t.registerCommand(S0,()=>((function(o,a){const s=a.redoStack,l=a.undoStack;if(l.length!==0){const u=a.current,d=l.pop();u!==null&&(s.push(u),o.dispatchCommand(Ep,!0)),l.length===0&&o.dispatchCommand(Tp,!1),a.current=d||null,d&&d.editor.setEditorState(d.editorState,{tag:zy})}})(t,e),!0),jt),t.registerCommand(E0,()=>((function(o,a){const s=a.redoStack,l=a.undoStack;if(s.length!==0){const u=a.current;u!==null&&(l.push(u),o.dispatchCommand(Tp,!0));const d=s.pop();s.length===0&&o.dispatchCommand(Ep,!1),a.current=d||null,d&&d.editor.setEditorState(d.editorState,{tag:zy})}})(t,e),!0),jt),t.registerCommand(TV,()=>(IT(e),!1),jt),t.registerCommand($V,()=>(IT(e),t.dispatchCommand(Ep,!1),t.dispatchCommand(Tp,!1),!0),jt),t.registerUpdateListener(({editorState:o,prevEditorState:a,dirtyLeaves:s,dirtyElements:l,tags:u})=>{const d=e.current,f=e.redoStack,h=e.undoStack,p=d===null?null:d.editorState;if(d!==null&&o===p)return;const g=r(a,o,d,s,l,u);if(g===1)f.length!==0&&(e.redoStack=[],t.dispatchCommand(Ep,!1)),d!==null&&(h.push({...d}),t.dispatchCommand(Tp,!0));else if(g===2)return;e.current={editor:t,editorState:o}}))}function tN(){return{current:null,redoStack:[],undoStack:[]}}const F_={build:(t,{delay:e,createInitialHistoryState:n,disabled:r})=>o7({delay:e,disabled:r,historyState:n(t)}),config:{createInitialHistoryState:tN,delay:300,disabled:typeof window>"u"},name:"@lexical/history/History",register:(t,e,n)=>{const r=n.getOutput();return e1(()=>r.disabled.value?void 0:eN(t,r.historyState.value,r.delay))}};C9(F_,{createInitialHistoryState:()=>{throw new Error("SharedHistory did not inherit parent history")},disabled:!0});const _7=new Set(["http:","https:","mailto:","sms:","tel:"]);let nc=class nN extends ir{__url;__target;__rel;__title;static getType(){return"link"}static clone(e){return new nN(e.__url,{rel:e.__rel,target:e.__target,title:e.__title},e.__key)}constructor(e="",n={},r){super(r);const{target:i=null,rel:o=null,title:a=null}=n;this.__url=e,this.__target=i,this.__rel=o,this.__title=a}createDOM(e){const n=document.createElement("a");return this.updateLinkDOM(null,n,e),Rr(n,e.theme.link),n}updateLinkDOM(e,n,r){if(EI(n)){e&&e.__url===this.__url||(n.href=this.sanitizeUrl(this.__url));for(const i of["target","rel","title"]){const o=`__${i}`,a=this[o];e&&e[o]===a||(a?n[i]=a:n.removeAttribute(i))}}}updateDOM(e,n,r){return this.updateLinkDOM(e,n,r),!1}static importDOM(){return{a:e=>({conversion:b7,priority:1})}}static importJSON(e){return Il().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setURL(e.url).setRel(e.rel||null).setTarget(e.target||null).setTitle(e.title||null)}sanitizeUrl(e){e=MT(e);try{const n=new URL(MT(e));if(!_7.has(n.protocol))return"about:blank"}catch{return e}return e}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),url:this.getURL()}}getURL(){return this.getLatest().__url}setURL(e){const n=this.getWritable();return n.__url=e,n}getTarget(){return this.getLatest().__target}setTarget(e){const n=this.getWritable();return n.__target=e,n}getRel(){return this.getLatest().__rel}setRel(e){const n=this.getWritable();return n.__rel=e,n}getTitle(){return this.getLatest().__title}setTitle(e){const n=this.getWritable();return n.__title=e,n}insertNewAfter(e,n=!0){const r=Il(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(r,n),r}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(e,n,r){if(!De(n))return!1;const i=n.anchor.getNode(),o=n.focus.getNode();return this.isParentOf(i)&&this.isParentOf(o)&&n.getTextContent().length>0}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||this.__url.startsWith("http://")}};function b7(t){let e=null;if(EI(t)){const n=t.textContent;(n!==null&&n!==""||t.children.length>0)&&(e=Il(t.getAttribute("href")||"",{rel:t.getAttribute("rel"),target:t.getAttribute("target"),title:t.getAttribute("title")}))}return{node:e}}function Il(t="",e){return Di(new nc(t,e))}function Ma(t){return t instanceof nc}let rN=class iN extends nc{__isUnlinked;constructor(e="",n={},r){super(e,n,r),this.__isUnlinked=n.isUnlinked!==void 0&&n.isUnlinked!==null&&n.isUnlinked}static getType(){return"autolink"}static clone(e){return new iN(e.__url,{isUnlinked:e.__isUnlinked,rel:e.__rel,target:e.__target,title:e.__title},e.__key)}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(e){const n=this.getWritable();return n.__isUnlinked=e,n}createDOM(e){return this.__isUnlinked?document.createElement("span"):super.createDOM(e)}updateDOM(e,n,r){return super.updateDOM(e,n,r)||e.__isUnlinked!==this.__isUnlinked}static importJSON(e){return NT().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setIsUnlinked(e.isUnlinked||!1)}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),isUnlinked:this.__isUnlinked}}insertNewAfter(e,n=!0){const r=this.getParentOrThrow().insertNewAfter(e,n);if(we(r)){const i=NT(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return r.append(i),i}return null}};function NT(t="",e){return Di(new rN(t,e))}function df(t){return t instanceof rN}const Qy=gt("TOGGLE_LINK_COMMAND");function RT(t,e){if(t.type==="element"){const n=t.getNode();return we(n)||(function(r,...i){const o=new URL("https://lexical.dev/docs/error"),a=new URLSearchParams;a.append("code",r);for(const s of i)a.append("v",s);throw o.search=a.toString(),Error(`Minified Lexical error #${r}; visit ${o.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(252),n.getChildren()[t.offset+e]||null}return null}function y7(t,e={}){let n;if(t&&typeof t=="object"){const{url:d,...f}=t;n=d,e={...f,...e}}else n=t;const{target:r,title:i}=e,o=e.rel===void 0?"noreferrer":e.rel,a=Ge();if(a===null||!De(a)&&!ai(a))return;if(ai(a)){const d=a.getNodes();return d.length===0?void 0:void d.forEach(f=>{if(n===null){const h=pi(f,p=>!df(p)&&Ma(p));h&&(h.insertBefore(f),h.getChildren().length===0&&h.remove())}else{const h=pi(f,p=>!df(p)&&Ma(p));if(h)h.setURL(n),r!==void 0&&h.setTarget(r),o!==void 0&&h.setRel(o);else{const p=Il(n,{rel:o,target:r});f.insertBefore(p),p.append(f)}}})}const s=a.extract();if(n===null){const d=new Set;return void s.forEach(f=>{const h=f.getParent();if(Ma(h)&&!df(h)){const p=h.getKey();if(d.has(p))return;(function(g,m){const v=new Set(m.filter(A=>g.isParentOf(A)).map(A=>A.getKey())),b=g.getChildren(),y=b.filter(A=>v.has(A.getKey()));if(y.length===b.length)return b.forEach(A=>g.insertBefore(A)),void g.remove();const w=b.findIndex(A=>v.has(A.getKey())),x=b.findLastIndex(A=>v.has(A.getKey())),E=w===0,$=x===b.length-1;if(E)y.forEach(A=>g.insertBefore(A));else if($)for(let A=y.length-1;A>=0;A--)g.insertAfter(y[A]);else{for(let k=y.length-1;k>=0;k--)g.insertAfter(y[k]);const A=b.slice(x+1);if(A.length>0){const k=Il(g.getURL(),{rel:g.getRel(),target:g.getTarget(),title:g.getTitle()});y[y.length-1].insertAfter(k),A.forEach(T=>k.append(T))}}})(h,s),d.add(p)}})}const l=new Set,u=d=>{l.has(d.getKey())||(l.add(d.getKey()),d.setURL(n),r!==void 0&&d.setTarget(r),o!==void 0&&d.setRel(o),i!==void 0&&d.setTitle(i))};if(s.length===1){const d=s[0],f=pi(d,Ma);if(f!==null)return u(f)}(function(d){const f=Ge();if(!De(f))return d();const h=Ru(f),p=h.isBackward(),g=RT(h.anchor,p?-1:0),m=RT(h.focus,p?0:-1);if(d(),g||m){const v=Ge();if(De(v)){const b=v.clone();if(g){const y=g.getParent();y&&b.anchor.set(y.getKey(),g.getIndexWithinParent()+(p?1:0),"element")}if(m){const y=m.getParent();y&&b.focus.set(y.getKey(),m.getIndexWithinParent()+(p?0:1),"element")}Br(Ru(b))}}})(()=>{let d=null;for(const f of s){if(!f.isAttached())continue;const h=pi(f,Ma);if(h){u(h);continue}if(we(f)){if(!f.isInline())continue;if(Ma(f)){if(!(df(f)||d!==null&&d.getParentOrThrow().isParentOf(f))){u(f),d=f;continue}for(const g of f.getChildren())f.insertBefore(g);f.remove();continue}}const p=f.getPreviousSibling();Ma(p)&&p.is(d)?p.append(f):(d=Il(n,{rel:o,target:r,title:i}),f.insertAfter(d),d.append(f))}})}const w7=/^\+?[0-9\s()-]{5,}$/;function MT(t){return t.match(/^[a-z][a-z0-9+.-]*:/i)||t.match(/^[/#.]/)?t:t.includes("@")?`mailto:${t}`:w7.test(t)?`tel:${t}`:`https://${t}`}function Ss(t,...e){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",t);for(const i of e)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function x7(t){let e=1,n=t.getParent();for(;n!=null;){if(Sn(n)){const r=n.getParent();if(Ot(r)){e++,n=r.getParent();continue}Ss(40)}return e}return e}function k7(t){let e=t.getParent();Ot(e)||Ss(40);let n=e;for(;n!==null;)n=n.getParent(),Ot(n)&&(e=n);return e}function ia(t){return Sn(t)&&Ot(t.getFirstChild())}function DT(t){return ro().append(t)}function S7(t,e){return Sn(t)&&(e.length===0||e.length===1&&t.is(e[0])&&t.getChildrenSize()===0)}function FT(t){const e=Ge();if(e!==null){let n=e.getNodes();if(De(e)){const i=e.getStartEndPoints();i===null&&Ss(143);const[o]=i,a=o.getNode(),s=a.getParent();if(Yi(a)){const l=a.getFirstChild();if(l)n=l.selectStart().getNodes();else{const u=Tn();a.append(u),n=u.select().getNodes()}}else if(S7(a,n)){const l=Ii(t);if(Yi(s)){a.replace(l);const u=ro();we(a)&&(u.setFormat(a.getFormatType()),u.setIndent(a.getIndent())),l.append(u)}else if(Sn(a)){const u=a.getParentOrThrow();ju(l,u.getChildren()),u.replace(l)}return}}const r=new Set;for(let i=0;i<n.length;i++){const o=n[i];if(we(o)&&o.isEmpty()&&!Sn(o)&&!r.has(o.getKey())){zT(o,t);continue}let a=i9(o)?o.getParent():Sn(o)&&o.isEmpty()?o:null;for(;a!=null;){const s=a.getKey();if(Ot(a)){if(!r.has(s)){const l=Ii(t);ju(l,a.getChildren()),a.replace(l),r.add(s)}break}{const l=a.getParent();if(Yi(l)&&!r.has(s)){r.add(s),zT(a,t);break}a=l}}}}}function ju(t,e){t.splice(t.getChildrenSize(),0,e)}function zT(t,e){if(Ot(t))return t;const n=t.getPreviousSibling(),r=t.getNextSibling(),i=ro();let o;if(ju(i,t.getChildren()),Ot(n)&&e===n.getListType())n.append(i),Ot(r)&&e===r.getListType()&&(ju(n,r.getChildren()),r.remove()),o=n;else if(Ot(r)&&e===r.getListType())r.getFirstChildOrThrow().insertBefore(i),o=r;else{const a=Ii(e);a.append(i),t.replace(a),o=a}return i.setFormat(t.getFormatType()),i.setIndent(t.getIndent()),t.remove(),o}function n1(t,e){const n=t.getLastChild(),r=e.getFirstChild();n&&r&&ia(n)&&ia(r)&&(n1(n.getFirstChild(),r.getFirstChild()),r.remove());const i=e.getChildren();i.length>0&&t.append(...i),e.remove()}function E7(t){const e=t.getListType()!=="check";let n=t.getStart();for(const r of t.getChildren())Sn(r)&&(r.getValue()!==n&&r.setValue(n),e&&r.getLatest().__checked!=null&&r.setChecked(void 0),Ot(r.getFirstChild())||n++)}function T7(t){const e=new Set;if(ia(t)||e.has(t.getKey()))return;const n=t.getParent(),r=t.getNextSibling(),i=t.getPreviousSibling();if(ia(r)&&ia(i)){const o=i.getFirstChild();if(Ot(o)){o.append(t);const a=r.getFirstChild();Ot(a)&&(ju(o,a.getChildren()),r.remove(),e.add(r.getKey()))}}else if(ia(r)){const o=r.getFirstChild();if(Ot(o)){const a=o.getFirstChild();a!==null&&a.insertBefore(t)}}else if(ia(i)){const o=i.getFirstChild();Ot(o)&&o.append(t)}else if(Ot(n)){const o=ro().setTextFormat(t.getTextFormat()).setTextStyle(t.getTextStyle()),a=Ii(n.getListType()).setTextFormat(n.getTextFormat()).setTextStyle(n.getTextStyle());o.append(a),a.append(t),i?i.insertAfter(o):r?r.insertBefore(o):n.append(o)}}function $7(t){if(ia(t))return;const e=t.getParent(),n=e?e.getParent():void 0;if(Ot(n?n.getParent():void 0)&&Sn(n)&&Ot(e)){const r=e?e.getFirstChild():void 0,i=e?e.getLastChild():void 0;if(t.is(r))n.insertBefore(t),e.isEmpty()&&n.remove();else if(t.is(i))n.insertAfter(t),e.isEmpty()&&n.remove();else{const o=e.getListType(),a=ro(),s=Ii(o);a.append(s),t.getPreviousSiblings().forEach(d=>s.append(d));const l=ro(),u=Ii(o);l.append(u),ju(u,t.getNextSiblings()),n.insertBefore(a),n.insertAfter(l),n.replace(t)}}}function A7(){const t=Ge();if(!De(t)||!t.isCollapsed())return!1;const e=t.anchor.getNode();if(!Sn(e)||e.getChildrenSize()!==0)return!1;const n=k7(e),r=e.getParent();Ot(r)||Ss(40);const i=r.getParent();let o;if(Yi(i))o=Tn(),n.insertAfter(o);else{if(!Sn(i))return!1;o=ro(),i.insertAfter(o)}o.setTextStyle(t.style).setTextFormat(t.format).select();const a=e.getNextSiblings();if(a.length>0){const s=Ii(r.getListType());if(Sn(o)){const l=ro();l.append(s),o.insertAfter(l)}else o.insertAfter(s);s.append(...a)}return(function(s){let l=s;for(;l.getNextSibling()==null&&l.getPreviousSibling()==null;){const u=l.getParent();if(u==null||!Sn(u)&&!Ot(u))break;l=u}l.remove()})(e),!0}function Wg(...t){const e=[];for(const n of t)if(n&&typeof n=="string")for(const[r]of n.matchAll(/\S+/g))e.push(r);return e}let Jh=class extends ir{__value;__checked;$config(){return this.config("listitem",{$transform:e=>{if(e.__checked==null)return;const n=e.getParent();Ot(n)&&n.getListType()!=="check"&&e.getChecked()!=null&&e.setChecked(void 0)},extends:ir,importDOM:{li:()=>({conversion:C7,priority:0})}})}constructor(e=1,n=void 0,r){super(r),this.__value=e===void 0?1:e,this.__checked=n}afterCloneFrom(e){super.afterCloneFrom(e),this.__value=e.__value,this.__checked=e.__checked}createDOM(e){const n=document.createElement("li");return this.updateListItemDOM(null,n,e),n}updateListItemDOM(e,n,r){(function(a,s,l){const u=s.getParent();!Ot(u)||u.getListType()!=="check"||Ot(s.getFirstChild())?(a.removeAttribute("role"),a.removeAttribute("tabIndex"),a.removeAttribute("aria-checked")):(a.setAttribute("role","checkbox"),a.setAttribute("tabIndex","-1"),l&&s.__checked===l.__checked||a.setAttribute("aria-checked",s.getChecked()?"true":"false"))})(n,this,e),n.value=this.__value,(function(a,s,l){const u=[],d=[],f=s.list,h=f?f.listitem:void 0;let p;if(f&&f.nested&&(p=f.nested.listitem),h!==void 0&&u.push(...Wg(h)),f){const g=l.getParent(),m=Ot(g)&&g.getListType()==="check",v=l.getChecked();m&&!v||d.push(f.listitemUnchecked),m&&v||d.push(f.listitemChecked),m&&u.push(v?f.listitemChecked:f.listitemUnchecked)}if(p!==void 0){const g=Wg(p);l.getChildren().some(m=>Ot(m))?u.push(...g):d.push(...g)}d.length>0&&Pl(a,...d),u.length>0&&Rr(a,...u)})(n,r.theme,this);const i=e?e.__style:"",o=this.__style;i!==o&&(o===""?n.removeAttribute("style"):n.style.cssText=o),(function(a,s,l){const u=iT(s.__textStyle);for(const d in u)a.style.setProperty(`--listitem-marker-${d}`,u[d]);if(l)for(const d in iT(l.__textStyle))d in u||a.style.removeProperty(`--listitem-marker-${d}`)})(n,this,e)}updateDOM(e,n,r){const i=n;return this.updateListItemDOM(e,i,r),!1}updateFromJSON(e){return super.updateFromJSON(e).setValue(e.value).setChecked(e.checked)}exportDOM(e){const n=this.createDOM(e._config),r=this.getFormatType();r&&(n.style.textAlign=r);const i=this.getDirection();return i&&(n.dir=i),{element:n}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),value:this.getValue()}}append(...e){for(let n=0;n<e.length;n++){const r=e[n];if(we(r)&&this.canMergeWith(r)){const i=r.getChildren();this.append(...i),r.remove()}else super.append(r)}return this}replace(e,n){if(Sn(e))return super.replace(e);this.setIndent(0);const r=this.getParentOrThrow();if(!Ot(r))return e;if(r.__first===this.getKey())r.insertBefore(e);else if(r.__last===this.getKey())r.insertAfter(e);else{const i=Ii(r.getListType());let o=this.getNextSibling();for(;o;){const a=o;o=o.getNextSibling(),i.append(a)}r.insertAfter(e),e.insertAfter(i)}return n&&(we(e)||Ss(139),this.getChildren().forEach(i=>{e.append(i)})),this.remove(),r.getChildrenSize()===0&&r.remove(),e}insertAfter(e,n=!0){const r=this.getParentOrThrow();if(Ot(r)||Ss(39),Sn(e))return super.insertAfter(e,n);const i=this.getNextSiblings();if(r.insertAfter(e,n),i.length!==0){const o=Ii(r.getListType());i.forEach(a=>o.append(a)),e.insertAfter(o,n)}return e}remove(e){const n=this.getPreviousSibling(),r=this.getNextSibling();super.remove(e),n&&r&&ia(n)&&ia(r)&&(n1(n.getFirstChild(),r.getFirstChild()),r.remove())}insertNewAfter(e,n=!0){const r=ro().updateFromJSON(this.exportJSON()).setChecked(!this.getChecked()&&void 0);return this.insertAfter(r,n),r}collapseAtStart(e){const n=Tn();this.getChildren().forEach(a=>n.append(a));const r=this.getParentOrThrow(),i=r.getParentOrThrow(),o=Sn(i);if(r.getChildrenSize()===1)if(o)r.remove(),i.select();else{r.insertBefore(n),r.remove();const a=e.anchor,s=e.focus,l=n.getKey();a.type==="element"&&a.getNode().is(this)&&a.set(l,a.offset,"element"),s.type==="element"&&s.getNode().is(this)&&s.set(l,s.offset,"element")}else r.insertBefore(n),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(e){const n=this.getWritable();return n.__value=e,n}getChecked(){const e=this.getLatest();let n;const r=this.getParent();return Ot(r)&&(n=r.getListType()),n==="check"?!!e.__checked:void 0}setChecked(e){const n=this.getWritable();return n.__checked=e,n}toggleChecked(){const e=this.getWritable();return e.setChecked(!e.__checked)}getIndent(){const e=this.getParent();if(e===null||!this.isAttached())return this.getLatest().__indent;let n=e.getParentOrThrow(),r=0;for(;Sn(n);)n=n.getParentOrThrow().getParentOrThrow(),r++;return r}setIndent(e){typeof e!="number"&&Ss(117),(e=Math.floor(e))>=0||Ss(199);let n=this.getIndent();for(;n!==e;)n<e?(T7(this),n++):($7(this),n--);return this}canInsertAfter(e){return Sn(e)}canReplaceWith(e){return Sn(e)}canMergeWith(e){return Sn(e)||Vh(e)}extractWithChild(e,n){if(!De(n))return!1;const r=n.anchor.getNode(),i=n.focus.getNode();return this.isParentOf(r)&&this.isParentOf(i)&&this.getTextContent().length===n.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return Ii("bullet")}canMergeWhenEmpty(){return!0}};function C7(t){if(t.classList.contains("task-list-item")){for(const n of t.children)if(n.tagName==="INPUT")return jT(n)}if(t.classList.contains("joplin-checkbox")){for(const n of t.children)if(n.classList.contains("checkbox-wrapper")&&n.children.length>0&&n.children[0].tagName==="INPUT")return jT(n.children[0])}const e=t.getAttribute("aria-checked");return{node:ro(e==="true"||e!=="false"&&void 0)}}function jT(t){return t.getAttribute("type")!=="checkbox"?{node:null}:{node:ro(t.hasAttribute("checked"))}}function ro(t){return Di(new Jh(void 0,t))}function Sn(t){return t instanceof Jh}let Ed=class extends ir{__tag;__start;__listType;$config(){return this.config("list",{$transform:e=>{(function(n){const r=n.getNextSibling();Ot(r)&&n.getListType()===r.getListType()&&n1(n,r)})(e),E7(e)},extends:ir,importDOM:{ol:()=>({conversion:BT,priority:0}),ul:()=>({conversion:BT,priority:0})}})}constructor(e="number",n=1,r){super(r);const i=O7[e]||e;this.__listType=i,this.__tag=i==="number"?"ol":"ul",this.__start=n}afterCloneFrom(e){super.afterCloneFrom(e),this.__listType=e.__listType,this.__tag=e.__tag,this.__start=e.__start}getTag(){return this.getLatest().__tag}setListType(e){const n=this.getWritable();return n.__listType=e,n.__tag=e==="number"?"ol":"ul",n}getListType(){return this.getLatest().__listType}getStart(){return this.getLatest().__start}setStart(e){const n=this.getWritable();return n.__start=e,n}createDOM(e,n){const r=this.__tag,i=document.createElement(r);return this.__start!==1&&i.setAttribute("start",String(this.__start)),i.__lexicalListType=this.__listType,UT(i,e.theme,this),i}updateDOM(e,n,r){return e.__tag!==this.__tag||e.__listType!==this.__listType||(UT(n,r.theme,this),!1)}updateFromJSON(e){return super.updateFromJSON(e).setListType(e.listType).setStart(e.start)}exportDOM(e){const n=this.createDOM(e._config,e);return In(n)&&(this.__start!==1&&n.setAttribute("start",String(this.__start)),this.__listType==="check"&&n.setAttribute("__lexicalListType","check")),{element:n}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag()}}canBeEmpty(){return!1}canIndent(){return!1}splice(e,n,r){let i=r;for(let o=0;o<r.length;o++){const a=r[o];Sn(a)||(i===r&&(i=[...r]),i[o]=ro().append(!we(a)||Ot(a)||a.isInline()?a:zn(a.getTextContent())))}return super.splice(e,n,i)}extractWithChild(e){return Sn(e)}};function UT(t,e,n){const r=[],i=[],o=e.list;if(o!==void 0){const a=o[`${n.__tag}Depth`]||[],s=x7(n)-1,l=s%a.length,u=a[l],d=o[n.__tag];let f;const h=o.nested,p=o.checklist;if(h!==void 0&&h.list&&(f=h.list),d!==void 0&&r.push(d),p!==void 0&&n.__listType==="check"&&r.push(p),u!==void 0){r.push(...Wg(u));for(let g=0;g<a.length;g++)g!==l&&i.push(n.__tag+g)}if(f!==void 0){const g=Wg(f);s>1?r.push(...g):i.push(...g)}}i.length>0&&Pl(t,...i),r.length>0&&Rr(t,...r)}function P7(t){const e=[];for(let n=0;n<t.length;n++){const r=t[n];if(Sn(r)){e.push(r);const i=r.getChildren();i.length>1&&i.forEach(o=>{Ot(o)&&e.push(DT(o))})}else e.push(DT(r))}return e}function BT(t){const e=t.nodeName.toLowerCase();let n=null;return e==="ol"?n=Ii("number",t.start):e==="ul"&&(n=(function(r){if(r.getAttribute("__lexicallisttype")==="check"||r.classList.contains("contains-task-list")||r.getAttribute("data-is-checklist")==="1")return!0;for(const i of r.childNodes)if(In(i)&&i.hasAttribute("aria-checked"))return!0;return!1})(t)?Ii("check"):Ii("bullet")),{after:P7,node:n}}const O7={ol:"number",ul:"bullet"};function Ii(t="number",e=1){return Di(new Ed(t,e))}function Ot(t){return t instanceof Ed}const oN=gt("INSERT_UNORDERED_LIST_COMMAND"),aN=gt("INSERT_ORDERED_LIST_COMMAND");function L7(t,e){const n=mI(e)?e.body.childNodes:e.childNodes;let r=[];const i=[];for(const o of n)if(!lN.has(o.nodeName)){const a=cN(o,t,i,!1);a!==null&&(r=r.concat(a))}return(function(o){for(const a of o)a.getNextSibling()instanceof I0&&a.insertAfter(no());for(const a of o){const s=a.getChildren();for(const l of s)a.insertBefore(l);a.remove()}})(i),r}function I7(t,e){if(typeof document>"u"||typeof window>"u"&&global.window===void 0)throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");const n=document.createElement("div"),r=ar().getChildren();for(let i=0;i<r.length;i++)sN(t,r[i],n,e);return n.innerHTML}function sN(t,e,n,r=null){let i=r===null||e.isSelected(r);const o=we(e)&&e.excludeFromCopy("html");let a=e;r!==null&&Ye(e)&&(a=NI(r,e,"clone"));const s=we(a)?a.getChildren():[],l=R0(t,a.getType());let u;u=l&&l.exportDOM!==void 0?l.exportDOM(t,a):a.exportDOM(t);const{element:d,after:f}=u;if(!d)return!1;const h=document.createDocumentFragment();for(let p=0;p<s.length;p++){const g=s[p],m=sN(t,g,h,r);!i&&we(e)&&m&&e.extractWithChild(g,r,"html")&&(i=!0)}if(i&&!o){if((In(d)||Vy(d))&&d.append(h),n.append(d),f){const p=f.call(a,d);p&&(Vy(d)?d.replaceChildren(p):d.replaceWith(p))}}else n.append(h);return i}const lN=new Set(["STYLE","SCRIPT"]);function cN(t,e,n,r,i=new Map,o){let a=[];if(lN.has(t.nodeName))return a;let s=null;const l=(function(g,m){const{nodeName:v}=g,b=m._htmlConversions.get(v.toLowerCase());let y=null;if(b!==void 0)for(const w of b){const x=w(g);x!==null&&(y===null||(y.priority||0)<=(x.priority||0))&&(y=x)}return y!==null?y.conversion:null})(t,e),u=l?l(t):null;let d=null;if(u!==null){d=u.after;const g=u.node;if(s=Array.isArray(g)?g[g.length-1]:g,s!==null){for(const[,m]of i)if(s=m(s,o),!s)break;s&&a.push(...Array.isArray(g)?g:[s])}u.forChild!=null&&i.set(t.nodeName,u.forChild)}const f=t.childNodes;let h=[];const p=(s==null||!Yi(s))&&(s!=null&&Uy(s)||r);for(let g=0;g<f.length;g++)h.push(...cN(f[g],e,n,p,new Map(i),s));return d!=null&&(h=d(h)),Gg(t)&&(h=N7(t,h,p?()=>{const g=new I0;return n.push(g),g}:Tn)),s==null?h.length>0?a=a.concat(h):Gg(t)&&(function(g){return g.nextSibling==null||g.previousSibling==null?!1:Gy(g.nextSibling)&&Gy(g.previousSibling)})(t)&&(a=a.concat(no())):we(s)&&s.append(...h),a}function N7(t,e,n){const r=t.style.textAlign,i=[];let o=[];for(let a=0;a<e.length;a++){const s=e[a];if(Uy(s))r&&!s.getFormat()&&s.setFormat(r),i.push(s);else if(o.push(s),a===e.length-1||a<e.length-1&&Uy(e[a+1])){const l=n();l.setFormat(r),l.append(...o),i.push(l),o=[]}}return i}function Yg(t,...e){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",t);for(const i of e)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function R7(t,e=Ge()){return e==null&&Yg(166),De(e)&&e.isCollapsed()||e.getNodes().length===0?"":I7(t,e)}function M7(t,e=Ge()){return e==null&&Yg(166),De(e)&&e.isCollapsed()||e.getNodes().length===0?null:JSON.stringify(D7(t,e))}function qT(t,e,n){const r=t.getData("application/x-lexical-editor");if(r)try{const s=JSON.parse(r);if(s.namespace===n._config.namespace&&Array.isArray(s.nodes))return HT(n,F7(s.nodes),e)}catch(s){console.error(s)}const i=t.getData("text/html"),o=t.getData("text/plain");if(i&&o!==i)try{const s=new DOMParser().parseFromString((function(l){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy("lexical",{createHTML:u=>u}).createHTML(l):l})(i),"text/html");return HT(n,L7(n,s),e)}catch(s){console.error(s)}const a=o||t.getData("text/uri-list");if(a!=null)if(De(e)){const s=a.split(/(\r?\n|\t)/);s[s.length-1]===""&&s.pop();for(let l=0;l<s.length;l++){const u=Ge();if(De(u)){const d=s[l];d===`
|
|
392
392
|
`||d===`\r
|
|
393
|
-
`?u.insertParagraph():d===" "?u.insertNodes([Do()]):u.insertText(d)}}}else e.insertRawText(a)}function HT(t,e,n){t.dispatchCommand(kK,{nodes:e,selection:n})||(n.insertNodes(e),(function(r){if(De(r)&&r.isCollapsed()){const i=r.anchor;let o=null;const a=es(i,"previous");if(a)if(Ls(a))o=a.origin;else{const s=Qa(a,ya(ar(),"next").getFlipped());for(const l of s){if(Ye(l.origin)){o=l.origin;break}if(we(l.origin)&&!l.origin.isInline())break}}if(o&&Ye(o)){const s=o.getFormat(),l=o.getStyle();r.format===s&&r.style===l||(r.format=s,r.style=l,r.dirty=!0)}}})(n))}function uN(t,e,n,r=[]){let i=e===null||n.isSelected(e);const o=we(n)&&n.excludeFromCopy("html");let a=n;e!==null&&Ye(a)&&(a=NI(e,a,"clone"));const s=we(a)?a.getChildren():[],l=(function(u){const d=u.exportJSON(),f=u.constructor;if(d.type!==f.getType()&&Yg(58,f.name),we(u)){const h=d.children;Array.isArray(h)||Yg(59,f.name)}return d})(a);Ye(a)&&a.getTextContentSize()===0&&(i=!1);for(let u=0;u<s.length;u++){const d=s[u],f=uN(t,e,d,l.children);!i&&we(n)&&f&&n.extractWithChild(d,e,"clone")&&(i=!0)}if(i&&!o)r.push(l);else if(Array.isArray(l.children))for(let u=0;u<l.children.length;u++){const d=l.children[u];r.push(d)}return i}function D7(t,e){const n=[],r=ar().getChildren();for(let i=0;i<r.length;i++)uN(t,e,r[i],n);return{namespace:t._config.namespace,nodes:n}}function F7(t){const e=[];for(let n=0;n<t.length;n++){const r=t[n],i=JK(r);Ye(i)&&OV(i),e.push(i)}return e}let zc=null;async function KT(t,e,n){if(zc!==null)return!1;if(e!==null)return new Promise((u,d)=>{t.update(()=>{u(VT(t,e,n))})});const r=t.getRootElement(),i=t._window||window,o=i.document,a=Bo(i);if(r===null||a===null)return!1;const s=o.createElement("span");s.style.cssText="position: fixed; top: -1000px;",s.append(o.createTextNode("#")),r.append(s);const l=new Range;return l.setStart(s,0),l.setEnd(s,1),a.removeAllRanges(),a.addRange(l),new Promise((u,d)=>{const f=t.registerCommand(nv,h=>(bl(h,ClipboardEvent)&&(f(),zc!==null&&(i.clearTimeout(zc),zc=null),u(VT(t,h,n))),!0),QK);zc=i.setTimeout(()=>{f(),zc=null,u(!1)},50),o.execCommand("copy"),s.remove()})}function VT(t,e,n){if(n===void 0){const i=Bo(t._window),o=Ge();if(!o||o.isCollapsed()||!i)return!1;const a=i.anchorNode,s=i.focusNode;if(a!==null&&s!==null&&!Gh(t,a,s))return!1;n=z7(o)}e.preventDefault();const r=e.clipboardData;return r!==null&&(j7(r,n),!0)}const dN=[["text/html",R7],["application/x-lexical-editor",M7]];function z7(t=Ge()){const e={"text/plain":t?t.getTextContent():""};if(t){const n=Yh();for(const[r,i]of dN){const o=i(n,t);o!==null&&(e[r]=o)}}return e}function j7(t,e){for(const[n]of dN)e[n]===void 0&&t.setData(n,"");for(const n in e){const r=e[n];r!==void 0&&t.setData(n,r)}}function GT(t,e){if(document.caretRangeFromPoint!==void 0){const n=document.caretRangeFromPoint(t,e);return n===null?null:{node:n.startContainer,offset:n.startOffset}}if(document.caretPositionFromPoint!=="undefined"){const n=document.caretPositionFromPoint(t,e);return n===null?null:{node:n.offsetNode,offset:n.offset}}return null}const xc=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,U7=xc&&"documentMode"in document?document.documentMode:null,B7=xc&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),q7=!(!xc||!("InputEvent"in window)||U7)&&"getTargetRanges"in new window.InputEvent("input"),H7=xc&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),WT=xc&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,K7=xc&&/^(?=.*Chrome).*/i.test(navigator.userAgent),V7=xc&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&B7&&!K7,YT=gt("DRAG_DROP_PASTE_FILE");let hv=class fN extends ir{static getType(){return"quote"}static clone(e){return new fN(e.__key)}createDOM(e){const n=document.createElement("blockquote");return Rr(n,e.theme.quote),n}updateDOM(e,n){return!1}static importDOM(){return{blockquote:e=>({conversion:G7,priority:0})}}exportDOM(e){const{element:n}=super.exportDOM(e);if(In(n)){this.isEmpty()&&n.append(document.createElement("br"));const r=this.getFormatType();r&&(n.style.textAlign=r);const i=this.getDirection();i&&(n.dir=i)}return{element:n}}static importJSON(e){return pv().updateFromJSON(e)}insertNewAfter(e,n){const r=Tn(),i=this.getDirection();return r.setDirection(i),this.insertAfter(r,n),r}collapseAtStart(){const e=Tn();return this.getChildren().forEach(n=>e.append(n)),this.replace(e),!0}canMergeWhenEmpty(){return!0}};function pv(){return Di(new hv)}function Jg(t){return t instanceof hv}let gv=class hN extends ir{__tag;static getType(){return"heading"}static clone(e){return new hN(e.__tag,e.__key)}constructor(e,n){super(n),this.__tag=e}getTag(){return this.__tag}setTag(e){const n=this.getWritable();return this.__tag=e,n}createDOM(e){const n=this.__tag,r=document.createElement(n),i=e.theme.heading;if(i!==void 0){const o=i[n];Rr(r,o)}return r}updateDOM(e,n,r){return e.__tag!==this.__tag}static importDOM(){return{h1:e=>({conversion:jc,priority:0}),h2:e=>({conversion:jc,priority:0}),h3:e=>({conversion:jc,priority:0}),h4:e=>({conversion:jc,priority:0}),h5:e=>({conversion:jc,priority:0}),h6:e=>({conversion:jc,priority:0}),p:e=>{const n=e.firstChild;return n!==null&&JT(n)?{conversion:()=>({node:null}),priority:3}:null},span:e=>JT(e)?{conversion:n=>({node:wl("h1")}),priority:3}:null}}exportDOM(e){const{element:n}=super.exportDOM(e);if(In(n)){this.isEmpty()&&n.append(document.createElement("br"));const r=this.getFormatType();r&&(n.style.textAlign=r);const i=this.getDirection();i&&(n.dir=i)}return{element:n}}static importJSON(e){return wl(e.tag).updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTag(e.tag)}exportJSON(){return{...super.exportJSON(),tag:this.getTag()}}insertNewAfter(e,n=!0){const r=e?e.anchor.offset:0,i=this.getLastDescendant(),o=!i||e&&e.anchor.key===i.getKey()&&r===i.getTextContentSize()||!e?Tn():wl(this.getTag()),a=this.getDirection();if(o.setDirection(a),this.insertAfter(o,n),r===0&&!this.isEmpty()&&e){const s=Tn();s.select(),this.replace(s,!0)}return o}collapseAtStart(){const e=this.isEmpty()?Tn():wl(this.getTag());return this.getChildren().forEach(n=>e.append(n)),this.replace(e),!0}extractWithChild(){return!0}};function JT(t){return t.nodeName.toLowerCase()==="span"&&t.style.fontSize==="26pt"}function jc(t){const e=t.nodeName.toLowerCase();let n=null;return e!=="h1"&&e!=="h2"&&e!=="h3"&&e!=="h4"&&e!=="h5"&&e!=="h6"||(n=wl(e),t.style!==null&&(q0(t,n),n.setFormat(t.style.textAlign))),{node:n}}function G7(t){const e=pv();return t.style!==null&&(e.setFormat(t.style.textAlign),q0(t,e)),{node:e}}function wl(t="h1"){return Di(new gv(t))}function pN(t){return t instanceof gv}function Mp(t){let e=null;if(bl(t,DragEvent)?e=t.dataTransfer:bl(t,ClipboardEvent)&&(e=t.clipboardData),e===null)return[!1,[],!1];const n=e.types,r=n.includes("Files"),i=n.includes("text/html")||n.includes("text/plain");return[r,Array.from(e.files),i]}function XT(t){const e=Ge();if(!De(e))return!1;const n=new Set,r=e.getNodes();for(let i=0;i<r.length;i++){const o=r[i],a=o.getKey();if(n.has(a))continue;const s=pi(o,u=>we(u)&&!u.isInline());if(s===null)continue;const l=s.getKey();s.canIndent()&&!n.has(l)&&(n.add(l),t(s))}return n.size>0}function ZT(t){const e=Us(t);return Gt(e)}function z_(t){for(const e of["lowercase","uppercase","capitalize"])t.hasFormat(e)&&t.toggleFormat(e)}function W7(t){return uh(t.registerCommand(RL,e=>{const n=Ge();return!!ai(n)&&(n.clear(),!0)},jt),t.registerCommand($l,e=>{const n=Ge();return De(n)?(n.deleteCharacter(e),!0):!!ai(n)&&(n.deleteNodes(),!0)},jt),t.registerCommand(ah,e=>{const n=Ge();return!!De(n)&&(n.deleteWord(e),!0)},jt),t.registerCommand(sh,e=>{const n=Ge();return!!De(n)&&(n.deleteLine(e),!0)},jt),t.registerCommand(ou,e=>{const n=Ge();if(typeof e=="string")n!==null&&n.insertText(e);else{if(n===null)return!1;const r=e.dataTransfer;if(r!=null)qT(r,n,t);else if(De(n)){const i=e.data;return i&&n.insertText(i),!0}}return!0},jt),t.registerCommand(Py,()=>{const e=Ge();return!!De(e)&&(e.removeText(),!0)},jt),t.registerCommand(Ua,e=>{const n=Ge();return!!De(n)&&(n.formatText(e),!0)},jt),t.registerCommand(SK,e=>{const n=Ge();if(!De(n)&&!ai(n))return!1;const r=n.getNodes();for(const i of r){const o=pi(i,a=>we(a)&&!a.isInline());o!==null&&o.setFormat(e)}return!0},jt),t.registerCommand(iu,e=>{const n=Ge();return!!De(n)&&(n.insertLineBreak(e),!0)},jt),t.registerCommand(oh,()=>{const e=Ge();return!!De(e)&&(e.insertParagraph(),!0)},jt),t.registerCommand(Ly,()=>(yd([Do()]),!0),jt),t.registerCommand(Os,()=>XT(e=>{const n=e.getIndent();e.setIndent(n+1)}),jt),t.registerCommand(_l,()=>XT(e=>{const n=e.getIndent();n>0&&e.setIndent(Math.max(0,n-1))}),jt),t.registerCommand(Mu,e=>{const n=Ge();if(ai(n)){const r=n.getNodes();if(r.length>0)return e.preventDefault(),r[0].selectPrevious(),!0}else if(De(n)){const r=qy(n.focus,!0);if(!e.shiftKey&&Gt(r)&&!r.isIsolated()&&!r.isInline())return r.selectPrevious(),e.preventDefault(),!0}return!1},jt),t.registerCommand(zg,e=>{const n=Ge();if(ai(n)){const r=n.getNodes();if(r.length>0)return e.preventDefault(),r[0].selectNext(0,0),!0}else if(De(n)){if((function(i){const o=i.focus;return o.key==="root"&&o.offset===ar().getChildrenSize()})(n))return e.preventDefault(),!0;const r=qy(n.focus,!1);if(!e.shiftKey&&Gt(r)&&!r.isIsolated()&&!r.isInline())return r.selectNext(),e.preventDefault(),!0}return!1},jt),t.registerCommand(FL,e=>{const n=Ge();if(ai(n)){const r=n.getNodes();if(r.length>0)return e.preventDefault(),oT(r[0])?r[0].selectNext(0,0):r[0].selectPrevious(),!0}if(!De(n))return!1;if(aT(n,!0)){const r=e.shiftKey;return e.preventDefault(),sT(n,r,!0),!0}return!1},jt),t.registerCommand(DL,e=>{const n=Ge();if(ai(n)){const i=n.getNodes();if(i.length>0)return e.preventDefault(),oT(i[0])?i[0].selectPrevious():i[0].selectNext(0,0),!0}if(!De(n))return!1;const r=e.shiftKey;return!!aT(n,!1)&&(e.preventDefault(),sT(n,r,!1),!0)},jt),t.registerCommand(jL,e=>{if(ZT(e.target))return!1;const n=Ge();if(De(n)){if((function(r){if(!r.isCollapsed())return!1;const{anchor:i}=r;if(i.offset!==0)return!1;const o=i.getNode();if(ur(o))return!1;const a=DV(o);return a.getIndent()>0&&(a.is(o)||o.is(a.getFirstDescendant()))})(n))return e.preventDefault(),t.dispatchCommand(_l,void 0);if(WT&&navigator.language==="ko-KR")return!1}else if(!ai(n))return!1;return e.preventDefault(),t.dispatchCommand($l,!0)},jt),t.registerCommand(BL,e=>{if(ZT(e.target))return!1;const n=Ge();return!(!De(n)&&!ai(n))&&(e.preventDefault(),t.dispatchCommand($l,!1))},jt),t.registerCommand(jg,e=>{const n=Ge();if(!De(n))return!1;if(z_(n),e!==null){if((WT||H7||V7)&&q7)return!1;if(e.preventDefault(),e.shiftKey)return t.dispatchCommand(iu,!1)}return t.dispatchCommand(oh,void 0)},jt),t.registerCommand(UL,()=>{const e=Ge();return!!De(e)&&(t.blur(),!0)},jt),t.registerCommand(qL,e=>{const[,n]=Mp(e);if(n.length>0){const i=GT(e.clientX,e.clientY);if(i!==null){const{offset:o,node:a}=i,s=Us(a);if(s!==null){const l=iv();if(Ye(s))l.anchor.set(s.getKey(),o,"text"),l.focus.set(s.getKey(),o,"text");else{const d=s.getParentOrThrow().getKey(),f=s.getIndexWithinParent()+1;l.anchor.set(d,f,"element"),l.focus.set(d,f,"element")}const u=Ru(l);Br(u)}t.dispatchCommand(YT,n)}return e.preventDefault(),!0}const r=Ge();return!!De(r)},jt),t.registerCommand(HL,e=>{const[n]=Mp(e),r=Ge();return!(n&&!De(r))},jt),t.registerCommand(KL,e=>{const[n]=Mp(e),r=Ge();if(n&&!De(r))return!1;const i=GT(e.clientX,e.clientY);if(i!==null){const o=Us(i.node);Gt(o)&&e.preventDefault()}return!0},jt),t.registerCommand(Iy,()=>(sV(),!0),jt),t.registerCommand(nv,e=>(KT(t,bl(e,ClipboardEvent)?e:null),!0),jt),t.registerCommand($0,e=>((async function(n,r){await KT(r,bl(n,ClipboardEvent)?n:null),r.update(()=>{const i=Ge();De(i)?i.removeText():ai(i)&&i.getNodes().forEach(o=>o.remove())})})(e,t),!0),jt),t.registerCommand(k0,e=>{const[,n,r]=Mp(e);return n.length>0&&!r?(t.dispatchCommand(YT,n),!0):kd(e.target)&&M0(e.target)?!1:Ge()!==null&&((function(i,o){i.preventDefault(),o.update(()=>{const a=Ge(),s=bl(i,InputEvent)||bl(i,KeyboardEvent)?null:i.clipboardData;s!=null&&a!==null&&qT(s,a,o)},{tag:IK})})(e,t),!0)},jt),t.registerCommand(zL,e=>{const n=Ge();return De(n)&&z_(n),!1},jt),t.registerCommand(T0,e=>{const n=Ge();return De(n)&&z_(n),!1},jt))}function Y7(t,e){const n={};for(const r of t){const i=e(r);i&&(n[i]?n[i].push(r):n[i]=[r])}return n}function gN(t){const e=Y7(t,n=>n.type);return{element:e.element||[],multilineElement:e["multiline-element"]||[],textFormat:e["text-format"]||[],textMatch:e["text-match"]||[]}}const QT=/[!-/:-@[-`{-~\s]/,J7=/^\s{0,3}$/;function ew(t){if(!Vh(t))return!1;const e=t.getFirstChild();return e==null||t.getChildrenSize()===1&&Ye(e)&&J7.test(e.getTextContent())}function X7(t,e,n,r){for(const i of e){if(!i.export)continue;const o=i.export(t,a=>Xg(a,n,r));if(o!=null)return o}return we(t)?Xg(t,n,r):Gt(t)?t.getTextContent():null}function Xg(t,e,n,r,i){const o=[],a=t.getChildren();r||(r=[]),i||(i=[]);e:for(const s of a){for(const l of n){if(!l.export)continue;const u=l.export(s,d=>Xg(d,e,n,r,[...i,...r]),(d,f)=>e$(d,f,e,r,i));if(u!=null){o.push(u);continue e}}Bn(s)?o.push(`
|
|
393
|
+
`?u.insertParagraph():d===" "?u.insertNodes([Do()]):u.insertText(d)}}}else e.insertRawText(a)}function HT(t,e,n){t.dispatchCommand(kV,{nodes:e,selection:n})||(n.insertNodes(e),(function(r){if(De(r)&&r.isCollapsed()){const i=r.anchor;let o=null;const a=es(i,"previous");if(a)if(Ls(a))o=a.origin;else{const s=Qa(a,ya(ar(),"next").getFlipped());for(const l of s){if(Ye(l.origin)){o=l.origin;break}if(we(l.origin)&&!l.origin.isInline())break}}if(o&&Ye(o)){const s=o.getFormat(),l=o.getStyle();r.format===s&&r.style===l||(r.format=s,r.style=l,r.dirty=!0)}}})(n))}function uN(t,e,n,r=[]){let i=e===null||n.isSelected(e);const o=we(n)&&n.excludeFromCopy("html");let a=n;e!==null&&Ye(a)&&(a=NI(e,a,"clone"));const s=we(a)?a.getChildren():[],l=(function(u){const d=u.exportJSON(),f=u.constructor;if(d.type!==f.getType()&&Yg(58,f.name),we(u)){const h=d.children;Array.isArray(h)||Yg(59,f.name)}return d})(a);Ye(a)&&a.getTextContentSize()===0&&(i=!1);for(let u=0;u<s.length;u++){const d=s[u],f=uN(t,e,d,l.children);!i&&we(n)&&f&&n.extractWithChild(d,e,"clone")&&(i=!0)}if(i&&!o)r.push(l);else if(Array.isArray(l.children))for(let u=0;u<l.children.length;u++){const d=l.children[u];r.push(d)}return i}function D7(t,e){const n=[],r=ar().getChildren();for(let i=0;i<r.length;i++)uN(t,e,r[i],n);return{namespace:t._config.namespace,nodes:n}}function F7(t){const e=[];for(let n=0;n<t.length;n++){const r=t[n],i=JV(r);Ye(i)&&O9(i),e.push(i)}return e}let zc=null;async function KT(t,e,n){if(zc!==null)return!1;if(e!==null)return new Promise((u,d)=>{t.update(()=>{u(VT(t,e,n))})});const r=t.getRootElement(),i=t._window||window,o=i.document,a=Bo(i);if(r===null||a===null)return!1;const s=o.createElement("span");s.style.cssText="position: fixed; top: -1000px;",s.append(o.createTextNode("#")),r.append(s);const l=new Range;return l.setStart(s,0),l.setEnd(s,1),a.removeAllRanges(),a.addRange(l),new Promise((u,d)=>{const f=t.registerCommand(nv,h=>(bl(h,ClipboardEvent)&&(f(),zc!==null&&(i.clearTimeout(zc),zc=null),u(VT(t,h,n))),!0),QV);zc=i.setTimeout(()=>{f(),zc=null,u(!1)},50),o.execCommand("copy"),s.remove()})}function VT(t,e,n){if(n===void 0){const i=Bo(t._window),o=Ge();if(!o||o.isCollapsed()||!i)return!1;const a=i.anchorNode,s=i.focusNode;if(a!==null&&s!==null&&!Gh(t,a,s))return!1;n=z7(o)}e.preventDefault();const r=e.clipboardData;return r!==null&&(j7(r,n),!0)}const dN=[["text/html",R7],["application/x-lexical-editor",M7]];function z7(t=Ge()){const e={"text/plain":t?t.getTextContent():""};if(t){const n=Yh();for(const[r,i]of dN){const o=i(n,t);o!==null&&(e[r]=o)}}return e}function j7(t,e){for(const[n]of dN)e[n]===void 0&&t.setData(n,"");for(const n in e){const r=e[n];r!==void 0&&t.setData(n,r)}}function GT(t,e){if(document.caretRangeFromPoint!==void 0){const n=document.caretRangeFromPoint(t,e);return n===null?null:{node:n.startContainer,offset:n.startOffset}}if(document.caretPositionFromPoint!=="undefined"){const n=document.caretPositionFromPoint(t,e);return n===null?null:{node:n.offsetNode,offset:n.offset}}return null}const xc=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,U7=xc&&"documentMode"in document?document.documentMode:null,B7=xc&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),q7=!(!xc||!("InputEvent"in window)||U7)&&"getTargetRanges"in new window.InputEvent("input"),H7=xc&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),WT=xc&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,K7=xc&&/^(?=.*Chrome).*/i.test(navigator.userAgent),V7=xc&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&B7&&!K7,YT=gt("DRAG_DROP_PASTE_FILE");let hv=class fN extends ir{static getType(){return"quote"}static clone(e){return new fN(e.__key)}createDOM(e){const n=document.createElement("blockquote");return Rr(n,e.theme.quote),n}updateDOM(e,n){return!1}static importDOM(){return{blockquote:e=>({conversion:G7,priority:0})}}exportDOM(e){const{element:n}=super.exportDOM(e);if(In(n)){this.isEmpty()&&n.append(document.createElement("br"));const r=this.getFormatType();r&&(n.style.textAlign=r);const i=this.getDirection();i&&(n.dir=i)}return{element:n}}static importJSON(e){return pv().updateFromJSON(e)}insertNewAfter(e,n){const r=Tn(),i=this.getDirection();return r.setDirection(i),this.insertAfter(r,n),r}collapseAtStart(){const e=Tn();return this.getChildren().forEach(n=>e.append(n)),this.replace(e),!0}canMergeWhenEmpty(){return!0}};function pv(){return Di(new hv)}function Jg(t){return t instanceof hv}let gv=class hN extends ir{__tag;static getType(){return"heading"}static clone(e){return new hN(e.__tag,e.__key)}constructor(e,n){super(n),this.__tag=e}getTag(){return this.__tag}setTag(e){const n=this.getWritable();return this.__tag=e,n}createDOM(e){const n=this.__tag,r=document.createElement(n),i=e.theme.heading;if(i!==void 0){const o=i[n];Rr(r,o)}return r}updateDOM(e,n,r){return e.__tag!==this.__tag}static importDOM(){return{h1:e=>({conversion:jc,priority:0}),h2:e=>({conversion:jc,priority:0}),h3:e=>({conversion:jc,priority:0}),h4:e=>({conversion:jc,priority:0}),h5:e=>({conversion:jc,priority:0}),h6:e=>({conversion:jc,priority:0}),p:e=>{const n=e.firstChild;return n!==null&&JT(n)?{conversion:()=>({node:null}),priority:3}:null},span:e=>JT(e)?{conversion:n=>({node:wl("h1")}),priority:3}:null}}exportDOM(e){const{element:n}=super.exportDOM(e);if(In(n)){this.isEmpty()&&n.append(document.createElement("br"));const r=this.getFormatType();r&&(n.style.textAlign=r);const i=this.getDirection();i&&(n.dir=i)}return{element:n}}static importJSON(e){return wl(e.tag).updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTag(e.tag)}exportJSON(){return{...super.exportJSON(),tag:this.getTag()}}insertNewAfter(e,n=!0){const r=e?e.anchor.offset:0,i=this.getLastDescendant(),o=!i||e&&e.anchor.key===i.getKey()&&r===i.getTextContentSize()||!e?Tn():wl(this.getTag()),a=this.getDirection();if(o.setDirection(a),this.insertAfter(o,n),r===0&&!this.isEmpty()&&e){const s=Tn();s.select(),this.replace(s,!0)}return o}collapseAtStart(){const e=this.isEmpty()?Tn():wl(this.getTag());return this.getChildren().forEach(n=>e.append(n)),this.replace(e),!0}extractWithChild(){return!0}};function JT(t){return t.nodeName.toLowerCase()==="span"&&t.style.fontSize==="26pt"}function jc(t){const e=t.nodeName.toLowerCase();let n=null;return e!=="h1"&&e!=="h2"&&e!=="h3"&&e!=="h4"&&e!=="h5"&&e!=="h6"||(n=wl(e),t.style!==null&&(q0(t,n),n.setFormat(t.style.textAlign))),{node:n}}function G7(t){const e=pv();return t.style!==null&&(e.setFormat(t.style.textAlign),q0(t,e)),{node:e}}function wl(t="h1"){return Di(new gv(t))}function pN(t){return t instanceof gv}function Mp(t){let e=null;if(bl(t,DragEvent)?e=t.dataTransfer:bl(t,ClipboardEvent)&&(e=t.clipboardData),e===null)return[!1,[],!1];const n=e.types,r=n.includes("Files"),i=n.includes("text/html")||n.includes("text/plain");return[r,Array.from(e.files),i]}function XT(t){const e=Ge();if(!De(e))return!1;const n=new Set,r=e.getNodes();for(let i=0;i<r.length;i++){const o=r[i],a=o.getKey();if(n.has(a))continue;const s=pi(o,u=>we(u)&&!u.isInline());if(s===null)continue;const l=s.getKey();s.canIndent()&&!n.has(l)&&(n.add(l),t(s))}return n.size>0}function ZT(t){const e=Us(t);return Gt(e)}function z_(t){for(const e of["lowercase","uppercase","capitalize"])t.hasFormat(e)&&t.toggleFormat(e)}function W7(t){return uh(t.registerCommand(RL,e=>{const n=Ge();return!!ai(n)&&(n.clear(),!0)},jt),t.registerCommand($l,e=>{const n=Ge();return De(n)?(n.deleteCharacter(e),!0):!!ai(n)&&(n.deleteNodes(),!0)},jt),t.registerCommand(ah,e=>{const n=Ge();return!!De(n)&&(n.deleteWord(e),!0)},jt),t.registerCommand(sh,e=>{const n=Ge();return!!De(n)&&(n.deleteLine(e),!0)},jt),t.registerCommand(ou,e=>{const n=Ge();if(typeof e=="string")n!==null&&n.insertText(e);else{if(n===null)return!1;const r=e.dataTransfer;if(r!=null)qT(r,n,t);else if(De(n)){const i=e.data;return i&&n.insertText(i),!0}}return!0},jt),t.registerCommand(Py,()=>{const e=Ge();return!!De(e)&&(e.removeText(),!0)},jt),t.registerCommand(Ua,e=>{const n=Ge();return!!De(n)&&(n.formatText(e),!0)},jt),t.registerCommand(SV,e=>{const n=Ge();if(!De(n)&&!ai(n))return!1;const r=n.getNodes();for(const i of r){const o=pi(i,a=>we(a)&&!a.isInline());o!==null&&o.setFormat(e)}return!0},jt),t.registerCommand(iu,e=>{const n=Ge();return!!De(n)&&(n.insertLineBreak(e),!0)},jt),t.registerCommand(oh,()=>{const e=Ge();return!!De(e)&&(e.insertParagraph(),!0)},jt),t.registerCommand(Ly,()=>(yd([Do()]),!0),jt),t.registerCommand(Os,()=>XT(e=>{const n=e.getIndent();e.setIndent(n+1)}),jt),t.registerCommand(_l,()=>XT(e=>{const n=e.getIndent();n>0&&e.setIndent(Math.max(0,n-1))}),jt),t.registerCommand(Mu,e=>{const n=Ge();if(ai(n)){const r=n.getNodes();if(r.length>0)return e.preventDefault(),r[0].selectPrevious(),!0}else if(De(n)){const r=qy(n.focus,!0);if(!e.shiftKey&&Gt(r)&&!r.isIsolated()&&!r.isInline())return r.selectPrevious(),e.preventDefault(),!0}return!1},jt),t.registerCommand(zg,e=>{const n=Ge();if(ai(n)){const r=n.getNodes();if(r.length>0)return e.preventDefault(),r[0].selectNext(0,0),!0}else if(De(n)){if((function(i){const o=i.focus;return o.key==="root"&&o.offset===ar().getChildrenSize()})(n))return e.preventDefault(),!0;const r=qy(n.focus,!1);if(!e.shiftKey&&Gt(r)&&!r.isIsolated()&&!r.isInline())return r.selectNext(),e.preventDefault(),!0}return!1},jt),t.registerCommand(FL,e=>{const n=Ge();if(ai(n)){const r=n.getNodes();if(r.length>0)return e.preventDefault(),oT(r[0])?r[0].selectNext(0,0):r[0].selectPrevious(),!0}if(!De(n))return!1;if(aT(n,!0)){const r=e.shiftKey;return e.preventDefault(),sT(n,r,!0),!0}return!1},jt),t.registerCommand(DL,e=>{const n=Ge();if(ai(n)){const i=n.getNodes();if(i.length>0)return e.preventDefault(),oT(i[0])?i[0].selectPrevious():i[0].selectNext(0,0),!0}if(!De(n))return!1;const r=e.shiftKey;return!!aT(n,!1)&&(e.preventDefault(),sT(n,r,!1),!0)},jt),t.registerCommand(jL,e=>{if(ZT(e.target))return!1;const n=Ge();if(De(n)){if((function(r){if(!r.isCollapsed())return!1;const{anchor:i}=r;if(i.offset!==0)return!1;const o=i.getNode();if(ur(o))return!1;const a=D9(o);return a.getIndent()>0&&(a.is(o)||o.is(a.getFirstDescendant()))})(n))return e.preventDefault(),t.dispatchCommand(_l,void 0);if(WT&&navigator.language==="ko-KR")return!1}else if(!ai(n))return!1;return e.preventDefault(),t.dispatchCommand($l,!0)},jt),t.registerCommand(BL,e=>{if(ZT(e.target))return!1;const n=Ge();return!(!De(n)&&!ai(n))&&(e.preventDefault(),t.dispatchCommand($l,!1))},jt),t.registerCommand(jg,e=>{const n=Ge();if(!De(n))return!1;if(z_(n),e!==null){if((WT||H7||V7)&&q7)return!1;if(e.preventDefault(),e.shiftKey)return t.dispatchCommand(iu,!1)}return t.dispatchCommand(oh,void 0)},jt),t.registerCommand(UL,()=>{const e=Ge();return!!De(e)&&(t.blur(),!0)},jt),t.registerCommand(qL,e=>{const[,n]=Mp(e);if(n.length>0){const i=GT(e.clientX,e.clientY);if(i!==null){const{offset:o,node:a}=i,s=Us(a);if(s!==null){const l=iv();if(Ye(s))l.anchor.set(s.getKey(),o,"text"),l.focus.set(s.getKey(),o,"text");else{const d=s.getParentOrThrow().getKey(),f=s.getIndexWithinParent()+1;l.anchor.set(d,f,"element"),l.focus.set(d,f,"element")}const u=Ru(l);Br(u)}t.dispatchCommand(YT,n)}return e.preventDefault(),!0}const r=Ge();return!!De(r)},jt),t.registerCommand(HL,e=>{const[n]=Mp(e),r=Ge();return!(n&&!De(r))},jt),t.registerCommand(KL,e=>{const[n]=Mp(e),r=Ge();if(n&&!De(r))return!1;const i=GT(e.clientX,e.clientY);if(i!==null){const o=Us(i.node);Gt(o)&&e.preventDefault()}return!0},jt),t.registerCommand(Iy,()=>(s9(),!0),jt),t.registerCommand(nv,e=>(KT(t,bl(e,ClipboardEvent)?e:null),!0),jt),t.registerCommand($0,e=>((async function(n,r){await KT(r,bl(n,ClipboardEvent)?n:null),r.update(()=>{const i=Ge();De(i)?i.removeText():ai(i)&&i.getNodes().forEach(o=>o.remove())})})(e,t),!0),jt),t.registerCommand(k0,e=>{const[,n,r]=Mp(e);return n.length>0&&!r?(t.dispatchCommand(YT,n),!0):kd(e.target)&&M0(e.target)?!1:Ge()!==null&&((function(i,o){i.preventDefault(),o.update(()=>{const a=Ge(),s=bl(i,InputEvent)||bl(i,KeyboardEvent)?null:i.clipboardData;s!=null&&a!==null&&qT(s,a,o)},{tag:IV})})(e,t),!0)},jt),t.registerCommand(zL,e=>{const n=Ge();return De(n)&&z_(n),!1},jt),t.registerCommand(T0,e=>{const n=Ge();return De(n)&&z_(n),!1},jt))}function Y7(t,e){const n={};for(const r of t){const i=e(r);i&&(n[i]?n[i].push(r):n[i]=[r])}return n}function gN(t){const e=Y7(t,n=>n.type);return{element:e.element||[],multilineElement:e["multiline-element"]||[],textFormat:e["text-format"]||[],textMatch:e["text-match"]||[]}}const QT=/[!-/:-@[-`{-~\s]/,J7=/^\s{0,3}$/;function ew(t){if(!Vh(t))return!1;const e=t.getFirstChild();return e==null||t.getChildrenSize()===1&&Ye(e)&&J7.test(e.getTextContent())}function X7(t,e,n,r){for(const i of e){if(!i.export)continue;const o=i.export(t,a=>Xg(a,n,r));if(o!=null)return o}return we(t)?Xg(t,n,r):Gt(t)?t.getTextContent():null}function Xg(t,e,n,r,i){const o=[],a=t.getChildren();r||(r=[]),i||(i=[]);e:for(const s of a){for(const l of n){if(!l.export)continue;const u=l.export(s,d=>Xg(d,e,n,r,[...i,...r]),(d,f)=>e$(d,f,e,r,i));if(u!=null){o.push(u);continue e}}Bn(s)?o.push(`
|
|
394
394
|
`):Ye(s)?o.push(e$(s,s.getTextContent(),e,r,i)):we(s)?o.push(Xg(s,e,n,r,i)):Gt(s)&&o.push(s.getTextContent())}return o.join("")}function e$(t,e,n,r,i){let o=t.getFormat()===0?e:(function(h){return h.replace(/^\s+|\s+$/g,p=>[...p].map(g=>"&#"+g.codePointAt(0)+";").join(""))})(e);t.hasFormat("code")||(o=o.replace(/([*_`~\\])/g,"\\$1"));let a="",s="",l="";const u=t$(t,!0),d=t$(t,!1),f=new Set;for(const h of n){const p=h.format[0],g=h.tag;Dp(t,p)&&!f.has(p)&&(f.add(p),Dp(u,p)&&r.find(m=>m.tag===g)||(r.push({format:p,tag:g}),a+=g))}for(let h=0;h<r.length;h++){const p=Dp(t,r[h].format),g=Dp(d,r[h].format);if(p&&g)continue;const m=[...r];for(;m.length>h;){const v=m.pop();i&&v&&i.find(b=>b.tag===v.tag)||(v&&typeof v.tag=="string"&&(p?g||(l+=v.tag):s+=v.tag),r.pop())}break}return o=a+o+l,s+o}function t$(t,e){let n=e?t.getPreviousSibling():t.getNextSibling();if(!n){const r=t.getParentOrThrow();r.isInline()&&(n=e?r.getPreviousSibling():r.getNextSibling())}for(;n;){if(we(n)){if(!n.isInline())break;const r=e?n.getLastDescendant():n.getFirstDescendant();if(Ye(r))return r;n=e?n.getPreviousSibling():n.getNextSibling()}if(Ye(n))return n;if(!we(n))return null}return null}function Dp(t,e){return Ye(t)&&t.hasFormat(e)}function Z7(t,e){const n=(function(i,o){const a=i.match(o.openTagsRegExp);if(a==null)return null;for(const s of a){const l=s.replace(/^\s/,""),u=o.fullMatchRegExpByTag[l];if(u==null)continue;const d=i.match(u),f=o.transformersByTag[l];if(d!=null&&f!=null){if(f.intraword!==!1)return d;const{index:h=0}=d,p=i[h-1],g=i[h+d[0].length];if((!p||QT.test(p))&&(!g||QT.test(g)))return d}}return null})(t.getTextContent(),e);if(!n)return null;const r=n.index||0;return{endIndex:r+n[0].length,match:n,startIndex:r,transformer:e.transformersByTag[n[1]]}}function Uc(t){return Ye(t)&&!t.hasFormat("code")}function cl(t,e,n){let r=Z7(t,e),i=(function(a,s){const l=a;let u,d,f,h;for(const p of s){if(!p.replace||!p.importRegExp)continue;const g=l.getTextContent().match(p.importRegExp);if(!g)continue;const m=g.index||0,v=p.getEndIndex?p.getEndIndex(l,g):m+g[0].length;v!==!1&&(u===void 0||d===void 0||m<u&&(v>d||v<=u))&&(u=m,d=v,f=p,h=g)}return u===void 0||d===void 0||f===void 0||h===void 0?null:{endIndex:d,match:h,startIndex:u,transformer:f}})(t,n);if(r&&i&&(r.startIndex<=i.startIndex&&r.endIndex>=i.endIndex||i.startIndex>r.endIndex?i=null:r=null),r){const a=(function(s,l,u,d,f){const h=s.getTextContent();let p,g,m;if(f[0]===h?p=s:l===0?[p,g]=s.splitText(u):[m,p,g]=s.splitText(l,u),p.setTextContent(f[2]),d)for(const v of d.format)p.hasFormat(v)||p.toggleFormat(v);return{nodeAfter:g,nodeBefore:m,transformedNode:p}})(t,r.startIndex,r.endIndex,r.transformer,r.match);Uc(a.nodeAfter)&&cl(a.nodeAfter,e,n),Uc(a.nodeBefore)&&cl(a.nodeBefore,e,n),Uc(a.transformedNode)&&cl(a.transformedNode,e,n)}else if(i){const a=(function(s,l,u,d,f){let h,p,g;return l===0?[h,p]=s.splitText(u):[g,h,p]=s.splitText(l,u),d.replace?{nodeAfter:p,nodeBefore:g,transformedNode:d.replace(h,f)||void 0}:null})(t,i.startIndex,i.endIndex,i.transformer,i.match);if(!a)return;Uc(a.nodeAfter)&&cl(a.nodeAfter,e,n),Uc(a.nodeBefore)&&cl(a.nodeBefore,e,n),Uc(a.transformedNode)&&cl(a.transformedNode,e,n)}const o=t.getTextContent().replace(/\\([*_`~\\])/g,"$1").replace(/&#(\d+);/g,(a,s)=>String.fromCodePoint(s));t.setTextContent(o)}function Q7(t,e=!1){const n=gN(t),r=(function(i){const o={},a={},s=[],l="(?<![\\\\])";for(const u of i){const{tag:d}=u;o[d]=u;const f=d.replace(/(\*|\^|\+)/g,"\\$1");s.push(f),d.length===1?a[d]=d==="`"?new RegExp("(?<![\\\\`])(`)((?:\\\\`|[^`])+?)(`)(?!`)"):new RegExp(`(?<![\\\\${f}])(${f})((\\\\${f})?.*?[^${f}\\s](\\\\${f})?)((?<!\\\\)|(?<=\\\\\\\\))(${f})(?![\\\\${f}])`):a[d]=new RegExp(`(?<!\\\\)(${f})((\\\\${f})?.*?[^\\s](\\\\${f})?)((?<!\\\\)|(?<=\\\\\\\\))(${f})(?!\\\\)`)}return{fullMatchRegExpByTag:a,openTagsRegExp:new RegExp(`${l}(${s.join("|")})`,"g"),transformersByTag:o}})(n.textFormat);return(i,o)=>{const a=i.split(`
|
|
395
|
-
`),s=a.length,l=o||ar();l.clear();for(let d=0;d<s;d++){const f=a[d],[h,p]=eG(a,d,n.multilineElement,l);h?d=p:tG(f,l,n.element,r,n.textMatch,e)}const u=l.getChildren();for(const d of u)!e&&ew(d)&&l.getChildrenSize()>1&&d.remove();Ge()!==null&&l.selectStart()}}function eG(t,e,n,r){for(const i of n){const{handleImportAfterStartMatch:o,regExpEnd:a,regExpStart:s,replace:l}=i,u=t[e].match(s);if(!u)continue;if(o){const g=o({lines:t,rootNode:r,startLineIndex:e,startMatch:u,transformer:i});if(g===null)continue;if(g)return g}const d=typeof a=="object"&&"regExp"in a?a.regExp:a,f=a&&typeof a=="object"&&"optional"in a?a.optional:!a;let h=e;const p=t.length;for(;h<p;){const g=d?t[h].match(d):null;if(!g&&(!f||f&&h<p-1)){h++;continue}if(g&&e===h&&g.index===u.index){h++;continue}const m=[];if(g&&e===h)m.push(t[e].slice(u[0].length,-g[0].length));else for(let v=e;v<=h;v++)if(v===e){const b=t[v].slice(u[0].length);m.push(b)}else if(v===h&&g){const b=t[v].slice(0,-g[0].length);m.push(b)}else m.push(t[v]);if(l(r,null,u,g,m,!0)!==!1)return[!0,h];break}}return[!1,e]}function tG(t,e,n,r,i,o){const a=zn(t),s=Tn();s.append(a),e.append(s);for(const{regExp:l,replace:u}of n){const d=t.match(l);if(d&&(a.setTextContent(t.slice(d[0].length)),u(s,[a],d,!0)!==!1))break}if(cl(a,r,i),s.isAttached()&&t.length>0){const l=s.getPreviousSibling();if(!o&&(Vh(l)||Jg(l)||Ot(l))){let u=l;if(Ot(l)){const d=l.getLastDescendant();u=d==null?null:pi(d,Sn)}u!=null&&u.getTextContentSize()>0&&(u.splice(u.getChildrenSize(),0,[no(),...s.getChildren()]),s.remove())}}}const mN=/^(\s*)(\d{1,})\.\s/,vN=/^(\s*)[-*+]\s/,nG=/^(\s*)(?:[-*+]\s)?\s?(\[(\s|x)?\])\s/i,tw=/^(#{1,6})\s/,_N=/^>\s/,bN=/^[ \t]*```([\w-]+)?/,nw=/[ \t]*```$/,rG=/^[ \t]*```[^`]+(?:(?:`{1,2}|`{4,})[^`]+)*```(?:[^`]|$)/,iG=/^(?:\|)(.+)(?:\|)\s?$/,oG=/^(\| ?:?-*:? ?)+\|\s?$/,n$=/^<[a-z_][\w-]*(?:\s[^<>]*)?\/?>/i,r$=/^<\/[a-z_][\w-]*\s*>/i,i$=t=>new RegExp(`(?:${t.source})$`,t.flags),ff=
|
|
395
|
+
`),s=a.length,l=o||ar();l.clear();for(let d=0;d<s;d++){const f=a[d],[h,p]=eG(a,d,n.multilineElement,l);h?d=p:tG(f,l,n.element,r,n.textMatch,e)}const u=l.getChildren();for(const d of u)!e&&ew(d)&&l.getChildrenSize()>1&&d.remove();Ge()!==null&&l.selectStart()}}function eG(t,e,n,r){for(const i of n){const{handleImportAfterStartMatch:o,regExpEnd:a,regExpStart:s,replace:l}=i,u=t[e].match(s);if(!u)continue;if(o){const g=o({lines:t,rootNode:r,startLineIndex:e,startMatch:u,transformer:i});if(g===null)continue;if(g)return g}const d=typeof a=="object"&&"regExp"in a?a.regExp:a,f=a&&typeof a=="object"&&"optional"in a?a.optional:!a;let h=e;const p=t.length;for(;h<p;){const g=d?t[h].match(d):null;if(!g&&(!f||f&&h<p-1)){h++;continue}if(g&&e===h&&g.index===u.index){h++;continue}const m=[];if(g&&e===h)m.push(t[e].slice(u[0].length,-g[0].length));else for(let v=e;v<=h;v++)if(v===e){const b=t[v].slice(u[0].length);m.push(b)}else if(v===h&&g){const b=t[v].slice(0,-g[0].length);m.push(b)}else m.push(t[v]);if(l(r,null,u,g,m,!0)!==!1)return[!0,h];break}}return[!1,e]}function tG(t,e,n,r,i,o){const a=zn(t),s=Tn();s.append(a),e.append(s);for(const{regExp:l,replace:u}of n){const d=t.match(l);if(d&&(a.setTextContent(t.slice(d[0].length)),u(s,[a],d,!0)!==!1))break}if(cl(a,r,i),s.isAttached()&&t.length>0){const l=s.getPreviousSibling();if(!o&&(Vh(l)||Jg(l)||Ot(l))){let u=l;if(Ot(l)){const d=l.getLastDescendant();u=d==null?null:pi(d,Sn)}u!=null&&u.getTextContentSize()>0&&(u.splice(u.getChildrenSize(),0,[no(),...s.getChildren()]),s.remove())}}}const mN=/^(\s*)(\d{1,})\.\s/,vN=/^(\s*)[-*+]\s/,nG=/^(\s*)(?:[-*+]\s)?\s?(\[(\s|x)?\])\s/i,tw=/^(#{1,6})\s/,_N=/^>\s/,bN=/^[ \t]*```([\w-]+)?/,nw=/[ \t]*```$/,rG=/^[ \t]*```[^`]+(?:(?:`{1,2}|`{4,})[^`]+)*```(?:[^`]|$)/,iG=/^(?:\|)(.+)(?:\|)\s?$/,oG=/^(\| ?:?-*:? ?)+\|\s?$/,n$=/^<[a-z_][\w-]*(?:\s[^<>]*)?\/?>/i,r$=/^<\/[a-z_][\w-]*\s*>/i,i$=t=>new RegExp(`(?:${t.source})$`,t.flags),ff=mV("mdListMarker",{parse:t=>typeof t=="string"&&/^[-*+]$/.test(t)?t:"-"}),yN=t=>(e,n,r,i)=>{const o=t(r);o.append(...n),e.replace(o),i||o.select(0,0)},wN=t=>(e,n,r,i)=>{const o=e.getPreviousSibling(),a=e.getNextSibling(),s=ro(t==="check"?r[3]==="x":void 0),l=r[0].trim()[0],u=t!=="bullet"&&t!=="check"||l!==ff.parse(l)?void 0:l;if(Ot(a)&&a.getListType()===t){u&&__(a,ff,u);const f=a.getFirstChild();f!==null?f.insertBefore(s):a.append(s),e.remove()}else if(Ot(o)&&o.getListType()===t)u&&__(o,ff,u),o.append(s),e.remove();else{const f=Ii(t,t==="number"?Number(r[2]):void 0);u&&__(f,ff,u),f.append(s),e.replace(f)}s.append(...n),i||s.select(0,0);const d=(function(f){const h=f.match(/\t/g),p=f.match(/ /g);let g=0;return h&&(g+=h.length),p&&(g+=Math.floor(p.length/4)),g})(r[1]);d&&s.setIndent(d)},r1=(t,e,n)=>{const r=[],i=t.getChildren();let o=0;for(const a of i)if(Sn(a)){if(a.getChildrenSize()===1){const f=a.getFirstChild();if(Ot(f)){r.push(r1(f,e,n+1));continue}}const s=" ".repeat(4*n),l=t.getListType(),u=TL(t,ff),d=l==="number"?`${t.getStart()+o}. `:l==="check"?`${u} [${a.getChecked()?"x":" "}] `:u+" ";r.push(s+d+e(a)),o++}return r.join(`
|
|
396
396
|
`)},aG={dependencies:[gv],export:(t,e)=>{if(!pN(t))return null;const n=Number(t.getTag().slice(1));return"#".repeat(n)+" "+e(t)},regExp:tw,replace:yN(t=>{const e="h"+t[1].length;return wl(e)}),type:"element"},sG={dependencies:[hv],export:(t,e)=>{if(!Jg(t))return null;const n=e(t).split(`
|
|
397
397
|
`),r=[];for(const i of n)r.push("> "+i);return r.join(`
|
|
398
398
|
`)},regExp:_N,replace:(t,e,n,r)=>{if(r){const o=t.getPreviousSibling();if(Jg(o))return o.splice(o.getChildrenSize(),0,[no(),...e]),void t.remove()}const i=pv();i.append(...e),t.replace(i),r||i.select(0,0)},type:"element"},lG={dependencies:[Ol],export:t=>{if(!bi(t))return null;const e=t.getTextContent();return"```"+(t.getLanguage()||"")+(e?`
|
|
@@ -401,19 +401,19 @@ ${a}`:o||a}function D4(t,{maxDepth:e=1e3,numbersAsFloat:n=!1}={}){if(Nh(t)!=="ob
|
|
|
401
401
|
`);let u=!1;const d=[];for(let f=0;f<l.length;f++){const h=l[f].trimEnd(),p=d[d.length-1];rG.test(h)?d.push(h):bN.test(h)||nw.test(h)?(u=!u,d.push(h)):u||h===""||p===""||!p||tw.test(p)||tw.test(h)||_N.test(h)||mN.test(h)||vN.test(h)||nG.test(h)||iG.test(h)||oG.test(h)||!s||n$.test(h)||r$.test(h)||i$(r$).test(p)||i$(n$).test(p)||nw.test(p)?d.push(h):d[d.length-1]=p+" "+h.trimStart()}return d.join(`
|
|
402
402
|
`)})(t,i);return Q7(e,r)(o,n)}function kN(t=Xh,e,n=!1){return(function(i,o=!1){const a=gN(i),s=[...a.multilineElement,...a.element],l=!o,u=a.textFormat.filter(d=>d.format.length===1).sort((d,f)=>Number(d.format.includes("code"))-Number(f.format.includes("code")));return d=>{const f=[],h=(d||ar()).getChildren();for(let p=0;p<h.length;p++){const g=h[p],m=X7(g,s,u,a.textMatch);m!=null&&f.push(l&&p>0&&!ew(g)&&!ew(h[p-1])?`
|
|
403
403
|
`.concat(m):m)}return f.join(`
|
|
404
|
-
`)}})(t,n)(e)}const i1=/^(\d+(?:\.\d+)?)px$/,ga={BOTH:3,NO_STATUS:0,ROW:1};class Td extends ir{__colSpan;__rowSpan;__headerState;__width;__backgroundColor;__verticalAlign;static getType(){return"tablecell"}static clone(e){return new Td(e.__headerState,e.__colSpan,e.__width,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__rowSpan=e.__rowSpan,this.__backgroundColor=e.__backgroundColor,this.__verticalAlign=e.__verticalAlign}static importDOM(){return{td:e=>({conversion:o$,priority:0}),th:e=>({conversion:o$,priority:0})}}static importJSON(e){return o1().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setHeaderStyles(e.headerState).setColSpan(e.colSpan||1).setRowSpan(e.rowSpan||1).setWidth(e.width||void 0).setBackgroundColor(e.backgroundColor||null).setVerticalAlign(e.verticalAlign||void 0)}constructor(e=ga.NO_STATUS,n=1,r,i){super(i),this.__colSpan=n,this.__rowSpan=1,this.__headerState=e,this.__width=r,this.__backgroundColor=null,this.__verticalAlign=void 0}createDOM(e){const n=document.createElement(this.getTag());return this.__width&&(n.style.width=`${this.__width}px`),this.__colSpan>1&&(n.colSpan=this.__colSpan),this.__rowSpan>1&&(n.rowSpan=this.__rowSpan),this.__backgroundColor!==null&&(n.style.backgroundColor=this.__backgroundColor),rw(this.__verticalAlign)&&(n.style.verticalAlign=this.__verticalAlign),Rr(n,e.theme.tableCell,this.hasHeader()&&e.theme.tableCellHeader),n}exportDOM(e){const n=super.exportDOM(e);if(In(n.element)){const r=n.element;r.setAttribute("data-temporary-table-cell-lexical-key",this.getKey()),r.style.border="1px solid black",this.__colSpan>1&&(r.colSpan=this.__colSpan),this.__rowSpan>1&&(r.rowSpan=this.__rowSpan),r.style.width=`${this.getWidth()||75}px`,r.style.verticalAlign=this.getVerticalAlign()||"top",r.style.textAlign="start",this.__backgroundColor===null&&this.hasHeader()&&(r.style.backgroundColor="#f2f3f5")}return n}exportJSON(){return{...super.exportJSON(),...rw(this.__verticalAlign)&&{verticalAlign:this.__verticalAlign},backgroundColor:this.getBackgroundColor(),colSpan:this.__colSpan,headerState:this.__headerState,rowSpan:this.__rowSpan,width:this.getWidth()}}getColSpan(){return this.getLatest().__colSpan}setColSpan(e){const n=this.getWritable();return n.__colSpan=e,n}getRowSpan(){return this.getLatest().__rowSpan}setRowSpan(e){const n=this.getWritable();return n.__rowSpan=e,n}getTag(){return this.hasHeader()?"th":"td"}setHeaderStyles(e,n=ga.BOTH){const r=this.getWritable();return r.__headerState=e&n|r.__headerState&~n,r}getHeaderStyles(){return this.getLatest().__headerState}setWidth(e){const n=this.getWritable();return n.__width=e,n}getWidth(){return this.getLatest().__width}getBackgroundColor(){return this.getLatest().__backgroundColor}setBackgroundColor(e){const n=this.getWritable();return n.__backgroundColor=e,n}getVerticalAlign(){return this.getLatest().__verticalAlign}setVerticalAlign(e){const n=this.getWritable();return n.__verticalAlign=e||void 0,n}toggleHeaderStyle(e){const n=this.getWritable();return(n.__headerState&e)===e?n.__headerState-=e:n.__headerState+=e,n}hasHeaderState(e){return(this.getHeaderStyles()&e)===e}hasHeader(){return this.getLatest().__headerState!==ga.NO_STATUS}updateDOM(e){return e.__headerState!==this.__headerState||e.__width!==this.__width||e.__colSpan!==this.__colSpan||e.__rowSpan!==this.__rowSpan||e.__backgroundColor!==this.__backgroundColor||e.__verticalAlign!==this.__verticalAlign}isShadowRoot(){return!0}collapseAtStart(){return!0}canBeEmpty(){return!1}canIndent(){return!1}}function rw(t){return t==="middle"||t==="bottom"}function o$(t){const e=t,n=t.nodeName.toLowerCase();let r;i1.test(e.style.width)&&(r=parseFloat(e.style.width));const i=o1(n==="th"?ga.ROW:ga.NO_STATUS,e.colSpan,r);i.__rowSpan=e.rowSpan;const o=e.style.backgroundColor;o!==""&&(i.__backgroundColor=o);const a=e.style.verticalAlign;rw(a)&&(i.__verticalAlign=a);const s=e.style,l=(s&&s.textDecoration||"").split(" "),u=s.fontWeight==="700"||s.fontWeight==="bold",d=l.includes("line-through"),f=s.fontStyle==="italic",h=l.includes("underline");return{after:p=>{const g=[];let m=null;const v=()=>{if(m){const b=m.getFirstChild();Bn(b)&&m.getChildrenSize()===1&&b.remove()}};for(const b of p)uV(b)||Ye(b)||Bn(b)?(Ye(b)&&(u&&b.toggleFormat("bold"),d&&b.toggleFormat("strikethrough"),f&&b.toggleFormat("italic"),h&&b.toggleFormat("underline")),m?m.append(b):(m=Tn().append(b),g.push(m))):(g.push(b),v(),m=null);return v(),g.length===0&&g.push(Tn()),g},node:i}}function o1(t=ga.NO_STATUS,e=1,n){return Di(new Td(t,e,n))}function rc(t){return t instanceof Td}function iw(t,...e){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",t);for(const i of e)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}class $d extends ir{__height;static getType(){return"tablerow"}static clone(e){return new $d(e.__height,e.__key)}static importDOM(){return{tr:e=>({conversion:EG,priority:0})}}static importJSON(e){return a1().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setHeight(e.height)}constructor(e,n){super(n),this.__height=e}exportJSON(){const e=this.getHeight();return{...super.exportJSON(),...e===void 0?void 0:{height:e}}}createDOM(e){const n=document.createElement("tr");return this.__height&&(n.style.height=`${this.__height}px`),Rr(n,e.theme.tableRow),n}extractWithChild(e,n,r){return r==="html"}isShadowRoot(){return!0}setHeight(e){const n=this.getWritable();return n.__height=e,n}getHeight(){return this.getLatest().__height}updateDOM(e){return e.__height!==this.__height}canBeEmpty(){return!1}canIndent(){return!1}}function EG(t){const e=t;let n;return i1.test(e.style.height)&&(n=parseFloat(e.style.height)),{after:r=>jI(r,rc),node:a1(n)}}function a1(t){return Di(new $d(t))}function fh(t){return t instanceof $d}const SN=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,TG=SN&&"documentMode"in document?document.documentMode:null;SN&&"InputEvent"in window&&!TG&&new window.InputEvent("input");function $G(t,e,n){const r=[];let i=null,o=null;function a(l){let u=r[l];return u===void 0&&(r[l]=u=[]),u}const s=t.getChildren();for(let l=0;l<s.length;l++){const u=s[l];fh(u)||iw(209);const d=a(l);for(let f=u.getFirstChild(),h=0;f!=null;f=f.getNextSibling()){for(rc(f)||iw(147);d[h]!==void 0;)h++;const p={cell:f,startColumn:h,startRow:l},{__rowSpan:g,__colSpan:m}=f;for(let v=0;v<g&&!(l+v>=s.length);v++){const b=a(l+v);for(let y=0;y<m;y++)b[h+y]=p}}}return[r,i,o]}function Vd(t){return In(t)&&t.nodeName==="TABLE"}function AG(t,e){for(let n=e,r=null;n!==null;n=n.getParent()){if(t.is(n))return r;rc(n)&&(r=n)}return null}function CG(t,e,n){return AG(t,Us(e,n))}function a$(t,e,n){if(!e.theme.tableAlignment)return;const r=[],i=[];for(const o of["center","right"]){const a=e.theme.tableAlignment[o];a&&(o===n?i:r).push(a)}Pl(t,...r),Rr(t,...i)}const PG=new WeakSet;function s$(t=Yh()){return PG.has(t)}class Ad extends ir{__rowStriping;__frozenColumnCount;__frozenRowCount;__colWidths;static getType(){return"table"}getColWidths(){return this.getLatest().__colWidths}setColWidths(e){const n=this.getWritable();return n.__colWidths=e,n}static clone(e){return new Ad(e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__colWidths=e.__colWidths,this.__rowStriping=e.__rowStriping,this.__frozenColumnCount=e.__frozenColumnCount,this.__frozenRowCount=e.__frozenRowCount}static importDOM(){return{table:e=>({conversion:OG,priority:1})}}static importJSON(e){return s1().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setRowStriping(e.rowStriping||!1).setFrozenColumns(e.frozenColumnCount||0).setFrozenRows(e.frozenRowCount||0).setColWidths(e.colWidths)}constructor(e){super(e),this.__rowStriping=!1,this.__frozenColumnCount=0,this.__frozenRowCount=0,this.__colWidths=void 0}exportJSON(){return{...super.exportJSON(),colWidths:this.getColWidths(),frozenColumnCount:this.__frozenColumnCount?this.__frozenColumnCount:void 0,frozenRowCount:this.__frozenRowCount?this.__frozenRowCount:void 0,rowStriping:this.__rowStriping?this.__rowStriping:void 0}}extractWithChild(e,n,r){return r==="html"}getDOMSlot(e){const n=Vd(e)?e:e.querySelector("table");return Vd(n)||iw(229),super.getDOMSlot(e).withElement(n).withAfter(n.querySelector("colgroup"))}createDOM(e,n){const r=document.createElement("table");this.__style&&(r.style.cssText=this.__style);const i=document.createElement("colgroup");if(r.appendChild(i),mV(i),Rr(r,e.theme.table),this.updateTableElement(null,r,e),s$(n)){const o=document.createElement("div"),a=e.theme.tableScrollableWrapper;return a?Rr(o,a):o.style.cssText="overflow-x: auto;",o.appendChild(r),this.updateTableWrapper(null,o,r,e),o}return r}updateTableWrapper(e,n,r,i){this.__frozenColumnCount!==(e?e.__frozenColumnCount:0)&&(function(o,a,s,l){l>0?(Rr(o,s.theme.tableFrozenColumn),a.setAttribute("data-lexical-frozen-column","true")):(Pl(o,s.theme.tableFrozenColumn),a.removeAttribute("data-lexical-frozen-column"))})(n,r,i,this.__frozenColumnCount),this.__frozenRowCount!==(e?e.__frozenRowCount:0)&&(function(o,a,s,l){l>0?(Rr(o,s.theme.tableFrozenRow),a.setAttribute("data-lexical-frozen-row","true")):(Pl(o,s.theme.tableFrozenRow),a.removeAttribute("data-lexical-frozen-row"))})(n,r,i,this.__frozenRowCount)}updateTableElement(e,n,r){this.__style!==(e?e.__style:"")&&(n.style.cssText=this.__style),this.__rowStriping!==(!!e&&e.__rowStriping)&&(function(i,o,a){a?(Rr(i,o.theme.tableRowStriping),i.setAttribute("data-lexical-row-striping","true")):(Pl(i,o.theme.tableRowStriping),i.removeAttribute("data-lexical-row-striping"))})(n,r,this.__rowStriping),(function(i,o,a,s){const l=i.querySelector("colgroup");if(!l)return;const u=[];for(let d=0;d<a;d++){const f=document.createElement("col"),h=s&&s[d];h&&(f.style.width=`${h}px`),u.push(f)}l.replaceChildren(...u)})(n,0,this.getColumnCount(),this.getColWidths()),a$(n,r,this.getFormatType())}updateDOM(e,n,r){const i=this.getDOMSlot(n).element;return n===i===s$()||(In(o=n)&&o.nodeName==="DIV"&&this.updateTableWrapper(e,n,i,r),this.updateTableElement(e,i,r),!1);var o}exportDOM(e){const n=super.exportDOM(e),{element:r}=n;return{after:i=>{if(n.after&&(i=n.after(i)),!Vd(i)&&In(i)&&(i=i.querySelector("table")),!Vd(i))return null;a$(i,e._config,this.getFormatType());const[o]=$G(this),a=new Map;for(const d of o)for(const f of d){const h=f.cell.getKey();a.has(h)||a.set(h,{colSpan:f.cell.getColSpan(),startColumn:f.startColumn})}const s=new Set;for(const d of i.querySelectorAll(":scope > tr > [data-temporary-table-cell-lexical-key]")){const f=d.getAttribute("data-temporary-table-cell-lexical-key");if(f){const h=a.get(f);if(d.removeAttribute("data-temporary-table-cell-lexical-key"),h){a.delete(f);for(let p=0;p<h.colSpan;p++)s.add(p+h.startColumn)}}}const l=i.querySelector(":scope > colgroup");if(l){const d=Array.from(i.querySelectorAll(":scope > colgroup > col")).filter((f,h)=>s.has(h));l.replaceChildren(...d)}const u=i.querySelectorAll(":scope > tr");if(u.length>0){const d=document.createElement("tbody");for(const f of u)d.appendChild(f);i.append(d)}return i},element:!Vd(r)&&In(r)?r.querySelector("table"):r}}canBeEmpty(){return!1}isShadowRoot(){return!0}getCordsFromCellNode(e,n){const{rows:r,domRows:i}=n;for(let o=0;o<r;o++){const a=i[o];if(a!=null)for(let s=0;s<a.length;s++){const l=a[s];if(l==null)continue;const{elem:u}=l,d=CG(this,u);if(d!==null&&e.is(d))return{x:s,y:o}}}throw new Error("Cell not found in table.")}getDOMCellFromCords(e,n,r){const{domRows:i}=r,o=i[n];if(o==null)return null;const a=o[e<o.length?e:o.length-1];return a??null}getDOMCellFromCordsOrThrow(e,n,r){const i=this.getDOMCellFromCords(e,n,r);if(!i)throw new Error("Cell not found at cords.");return i}getCellNodeFromCords(e,n,r){const i=this.getDOMCellFromCords(e,n,r);if(i==null)return null;const o=Us(i.elem);return rc(o)?o:null}getCellNodeFromCordsOrThrow(e,n,r){const i=this.getCellNodeFromCords(e,n,r);if(!i)throw new Error("Node at cords not TableCellNode.");return i}getRowStriping(){return!!this.getLatest().__rowStriping}setRowStriping(e){const n=this.getWritable();return n.__rowStriping=e,n}setFrozenColumns(e){const n=this.getWritable();return n.__frozenColumnCount=e,n}getFrozenColumns(){return this.getLatest().__frozenColumnCount}setFrozenRows(e){const n=this.getWritable();return n.__frozenRowCount=e,n}getFrozenRows(){return this.getLatest().__frozenRowCount}canSelectBefore(){return!0}canIndent(){return!1}getColumnCount(){const e=this.getFirstChild();if(!e)return 0;let n=0;return e.getChildren().forEach(r=>{rc(r)&&(n+=r.getColSpan())}),n}}function OG(t){const e=s1();t.hasAttribute("data-lexical-row-striping")&&e.setRowStriping(!0),t.hasAttribute("data-lexical-frozen-column")&&e.setFrozenColumns(1),t.hasAttribute("data-lexical-frozen-row")&&e.setFrozenRows(1);const n=t.querySelector(":scope > colgroup");if(n){let r=[];for(const i of n.querySelectorAll(":scope > col")){let o=i.style.width||"";if(!i1.test(o)&&(o=i.getAttribute("width")||"",!/^\d+$/.test(o))){r=void 0;break}r.push(parseFloat(o))}r&&e.setColWidths(r)}return{after:r=>jI(r,fh),node:e}}function s1(){return Di(new Ad)}function j_(t){return t instanceof Ad}var U_={exports:{}},l$;function LG(){return l$||(l$=1,(function(t){var e={core:{meta:{path:"components/prism-core.js",option:"mandatory"},core:"Core"},themes:{meta:{path:"themes/{id}.css",link:"index.html?theme={id}",exclusive:!0},prism:{title:"Default",option:"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{title:"Okaidia",owner:"ocodia"},"prism-twilight":{title:"Twilight",owner:"remybach"},"prism-coy":{title:"Coy",owner:"tshedor"},"prism-solarizedlight":{title:"Solarized Light",owner:"hectormatos2011 "},"prism-tomorrow":{title:"Tomorrow Night",owner:"Rosey"}},languages:{meta:{path:"components/prism-{id}",noCSS:!0,examplesPath:"examples/prism-{id}",addCheckAll:!0},markup:{title:"Markup",alias:["html","xml","svg","mathml","ssml","atom","rss"],aliasTitles:{html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",atom:"Atom",rss:"RSS"},option:"default"},css:{title:"CSS",option:"default",modify:"markup"},clike:{title:"C-like",option:"default"},javascript:{title:"JavaScript",require:"clike",modify:"markup",optional:"regex",alias:"js",option:"default"},abap:{title:"ABAP",owner:"dellagustin"},abnf:{title:"ABNF",owner:"RunDevelopment"},actionscript:{title:"ActionScript",require:"javascript",modify:"markup",owner:"Golmote"},ada:{title:"Ada",owner:"Lucretia"},agda:{title:"Agda",owner:"xy-ren"},al:{title:"AL",owner:"RunDevelopment"},antlr4:{title:"ANTLR4",alias:"g4",owner:"RunDevelopment"},apacheconf:{title:"Apache Configuration",owner:"GuiTeK"},apex:{title:"Apex",require:["clike","sql"],owner:"RunDevelopment"},apl:{title:"APL",owner:"ngn"},applescript:{title:"AppleScript",owner:"Golmote"},aql:{title:"AQL",owner:"RunDevelopment"},arduino:{title:"Arduino",require:"cpp",alias:"ino",owner:"dkern"},arff:{title:"ARFF",owner:"Golmote"},armasm:{title:"ARM Assembly",alias:"arm-asm",owner:"RunDevelopment"},arturo:{title:"Arturo",alias:"art",optional:["bash","css","javascript","markup","markdown","sql"],owner:"drkameleon"},asciidoc:{alias:"adoc",title:"AsciiDoc",owner:"Golmote"},aspnet:{title:"ASP.NET (C#)",require:["markup","csharp"],owner:"nauzilus"},asm6502:{title:"6502 Assembly",owner:"kzurawel"},asmatmel:{title:"Atmel AVR Assembly",owner:"cerkit"},autohotkey:{title:"AutoHotkey",owner:"aviaryan"},autoit:{title:"AutoIt",owner:"Golmote"},avisynth:{title:"AviSynth",alias:"avs",owner:"Zinfidel"},"avro-idl":{title:"Avro IDL",alias:"avdl",owner:"RunDevelopment"},awk:{title:"AWK",alias:"gawk",aliasTitles:{gawk:"GAWK"},owner:"RunDevelopment"},bash:{title:"Bash",alias:["sh","shell"],aliasTitles:{sh:"Shell",shell:"Shell"},owner:"zeitgeist87"},basic:{title:"BASIC",owner:"Golmote"},batch:{title:"Batch",owner:"Golmote"},bbcode:{title:"BBcode",alias:"shortcode",aliasTitles:{shortcode:"Shortcode"},owner:"RunDevelopment"},bbj:{title:"BBj",owner:"hyyan"},bicep:{title:"Bicep",owner:"johnnyreilly"},birb:{title:"Birb",require:"clike",owner:"Calamity210"},bison:{title:"Bison",require:"c",owner:"Golmote"},bnf:{title:"BNF",alias:"rbnf",aliasTitles:{rbnf:"RBNF"},owner:"RunDevelopment"},bqn:{title:"BQN",owner:"yewscion"},brainfuck:{title:"Brainfuck",owner:"Golmote"},brightscript:{title:"BrightScript",owner:"RunDevelopment"},bro:{title:"Bro",owner:"wayward710"},bsl:{title:"BSL (1C:Enterprise)",alias:"oscript",aliasTitles:{oscript:"OneScript"},owner:"Diversus23"},c:{title:"C",require:"clike",owner:"zeitgeist87"},csharp:{title:"C#",require:"clike",alias:["cs","dotnet"],owner:"mvalipour"},cpp:{title:"C++",require:"c",owner:"zeitgeist87"},cfscript:{title:"CFScript",require:"clike",alias:"cfc",owner:"mjclemente"},chaiscript:{title:"ChaiScript",require:["clike","cpp"],owner:"RunDevelopment"},cil:{title:"CIL",owner:"sbrl"},cilkc:{title:"Cilk/C",require:"c",alias:"cilk-c",owner:"OpenCilk"},cilkcpp:{title:"Cilk/C++",require:"cpp",alias:["cilk-cpp","cilk"],owner:"OpenCilk"},clojure:{title:"Clojure",owner:"troglotit"},cmake:{title:"CMake",owner:"mjrogozinski"},cobol:{title:"COBOL",owner:"RunDevelopment"},coffeescript:{title:"CoffeeScript",require:"javascript",alias:"coffee",owner:"R-osey"},concurnas:{title:"Concurnas",alias:"conc",owner:"jasontatton"},csp:{title:"Content-Security-Policy",owner:"ScottHelme"},cooklang:{title:"Cooklang",owner:"ahue"},coq:{title:"Coq",owner:"RunDevelopment"},crystal:{title:"Crystal",require:"ruby",owner:"MakeNowJust"},"css-extras":{title:"CSS Extras",require:"css",modify:"css",owner:"milesj"},csv:{title:"CSV",owner:"RunDevelopment"},cue:{title:"CUE",owner:"RunDevelopment"},cypher:{title:"Cypher",owner:"RunDevelopment"},d:{title:"D",require:"clike",owner:"Golmote"},dart:{title:"Dart",require:"clike",owner:"Golmote"},dataweave:{title:"DataWeave",owner:"machaval"},dax:{title:"DAX",owner:"peterbud"},dhall:{title:"Dhall",owner:"RunDevelopment"},diff:{title:"Diff",owner:"uranusjr"},django:{title:"Django/Jinja2",require:"markup-templating",alias:"jinja2",owner:"romanvm"},"dns-zone-file":{title:"DNS zone file",owner:"RunDevelopment",alias:"dns-zone"},docker:{title:"Docker",alias:"dockerfile",owner:"JustinBeckwith"},dot:{title:"DOT (Graphviz)",alias:"gv",optional:"markup",owner:"RunDevelopment"},ebnf:{title:"EBNF",owner:"RunDevelopment"},editorconfig:{title:"EditorConfig",owner:"osipxd"},eiffel:{title:"Eiffel",owner:"Conaclos"},ejs:{title:"EJS",require:["javascript","markup-templating"],owner:"RunDevelopment",alias:"eta",aliasTitles:{eta:"Eta"}},elixir:{title:"Elixir",owner:"Golmote"},elm:{title:"Elm",owner:"zwilias"},etlua:{title:"Embedded Lua templating",require:["lua","markup-templating"],owner:"RunDevelopment"},erb:{title:"ERB",require:["ruby","markup-templating"],owner:"Golmote"},erlang:{title:"Erlang",owner:"Golmote"},"excel-formula":{title:"Excel Formula",alias:["xlsx","xls"],owner:"RunDevelopment"},fsharp:{title:"F#",require:"clike",owner:"simonreynolds7"},factor:{title:"Factor",owner:"catb0t"},false:{title:"False",owner:"edukisto"},"firestore-security-rules":{title:"Firestore security rules",require:"clike",owner:"RunDevelopment"},flow:{title:"Flow",require:"javascript",owner:"Golmote"},fortran:{title:"Fortran",owner:"Golmote"},ftl:{title:"FreeMarker Template Language",require:"markup-templating",owner:"RunDevelopment"},gml:{title:"GameMaker Language",alias:"gamemakerlanguage",require:"clike",owner:"LiarOnce"},gap:{title:"GAP (CAS)",owner:"RunDevelopment"},gcode:{title:"G-code",owner:"RunDevelopment"},gdscript:{title:"GDScript",owner:"RunDevelopment"},gedcom:{title:"GEDCOM",owner:"Golmote"},gettext:{title:"gettext",alias:"po",owner:"RunDevelopment"},gherkin:{title:"Gherkin",owner:"hason"},git:{title:"Git",owner:"lgiraudel"},glsl:{title:"GLSL",require:"c",owner:"Golmote"},gn:{title:"GN",alias:"gni",owner:"RunDevelopment"},"linker-script":{title:"GNU Linker Script",alias:"ld",owner:"RunDevelopment"},go:{title:"Go",require:"clike",owner:"arnehormann"},"go-module":{title:"Go module",alias:"go-mod",owner:"RunDevelopment"},gradle:{title:"Gradle",require:"clike",owner:"zeabdelkhalek-badido18"},graphql:{title:"GraphQL",optional:"markdown",owner:"Golmote"},groovy:{title:"Groovy",require:"clike",owner:"robfletcher"},haml:{title:"Haml",require:"ruby",optional:["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],owner:"Golmote"},handlebars:{title:"Handlebars",require:"markup-templating",alias:["hbs","mustache"],aliasTitles:{mustache:"Mustache"},owner:"Golmote"},haskell:{title:"Haskell",alias:"hs",owner:"bholst"},haxe:{title:"Haxe",require:"clike",optional:"regex",owner:"Golmote"},hcl:{title:"HCL",owner:"outsideris"},hlsl:{title:"HLSL",require:"c",owner:"RunDevelopment"},hoon:{title:"Hoon",owner:"matildepark"},http:{title:"HTTP",optional:["csp","css","hpkp","hsts","javascript","json","markup","uri"],owner:"danielgtaylor"},hpkp:{title:"HTTP Public-Key-Pins",owner:"ScottHelme"},hsts:{title:"HTTP Strict-Transport-Security",owner:"ScottHelme"},ichigojam:{title:"IchigoJam",owner:"BlueCocoa"},icon:{title:"Icon",owner:"Golmote"},"icu-message-format":{title:"ICU Message Format",owner:"RunDevelopment"},idris:{title:"Idris",alias:"idr",owner:"KeenS",require:"haskell"},ignore:{title:".ignore",owner:"osipxd",alias:["gitignore","hgignore","npmignore"],aliasTitles:{gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore"}},inform7:{title:"Inform 7",owner:"Golmote"},ini:{title:"Ini",owner:"aviaryan"},io:{title:"Io",owner:"AlesTsurko"},j:{title:"J",owner:"Golmote"},java:{title:"Java",require:"clike",owner:"sherblot"},javadoc:{title:"JavaDoc",require:["markup","java","javadoclike"],modify:"java",optional:"scala",owner:"RunDevelopment"},javadoclike:{title:"JavaDoc-like",modify:["java","javascript","php"],owner:"RunDevelopment"},javastacktrace:{title:"Java stack trace",owner:"RunDevelopment"},jexl:{title:"Jexl",owner:"czosel"},jolie:{title:"Jolie",require:"clike",owner:"thesave"},jq:{title:"JQ",owner:"RunDevelopment"},jsdoc:{title:"JSDoc",require:["javascript","javadoclike","typescript"],modify:"javascript",optional:["actionscript","coffeescript"],owner:"RunDevelopment"},"js-extras":{title:"JS Extras",require:"javascript",modify:"javascript",optional:["actionscript","coffeescript","flow","n4js","typescript"],owner:"RunDevelopment"},json:{title:"JSON",alias:"webmanifest",aliasTitles:{webmanifest:"Web App Manifest"},owner:"CupOfTea696"},json5:{title:"JSON5",require:"json",owner:"RunDevelopment"},jsonp:{title:"JSONP",require:"json",owner:"RunDevelopment"},jsstacktrace:{title:"JS stack trace",owner:"sbrl"},"js-templates":{title:"JS Templates",require:"javascript",modify:"javascript",optional:["css","css-extras","graphql","markdown","markup","sql"],owner:"RunDevelopment"},julia:{title:"Julia",owner:"cdagnino"},keepalived:{title:"Keepalived Configure",owner:"dev-itsheng"},keyman:{title:"Keyman",owner:"mcdurdin"},kotlin:{title:"Kotlin",alias:["kt","kts"],aliasTitles:{kts:"Kotlin Script"},require:"clike",owner:"Golmote"},kumir:{title:"KuMir (КуМир)",alias:"kum",owner:"edukisto"},kusto:{title:"Kusto",owner:"RunDevelopment"},latex:{title:"LaTeX",alias:["tex","context"],aliasTitles:{tex:"TeX",context:"ConTeXt"},owner:"japborst"},latte:{title:"Latte",require:["clike","markup-templating","php"],owner:"nette"},less:{title:"Less",require:"css",optional:"css-extras",owner:"Golmote"},lilypond:{title:"LilyPond",require:"scheme",alias:"ly",owner:"RunDevelopment"},liquid:{title:"Liquid",require:"markup-templating",owner:"cinhtau"},lisp:{title:"Lisp",alias:["emacs","elisp","emacs-lisp"],owner:"JuanCaicedo"},livescript:{title:"LiveScript",owner:"Golmote"},llvm:{title:"LLVM IR",owner:"porglezomp"},log:{title:"Log file",optional:"javastacktrace",owner:"RunDevelopment"},lolcode:{title:"LOLCODE",owner:"Golmote"},lua:{title:"Lua",owner:"Golmote"},magma:{title:"Magma (CAS)",owner:"RunDevelopment"},makefile:{title:"Makefile",owner:"Golmote"},markdown:{title:"Markdown",require:"markup",optional:"yaml",alias:"md",owner:"Golmote"},"markup-templating":{title:"Markup templating",require:"markup",owner:"Golmote"},mata:{title:"Mata",owner:"RunDevelopment"},matlab:{title:"MATLAB",owner:"Golmote"},maxscript:{title:"MAXScript",owner:"RunDevelopment"},mel:{title:"MEL",owner:"Golmote"},mermaid:{title:"Mermaid",owner:"RunDevelopment"},metafont:{title:"METAFONT",owner:"LaeriExNihilo"},mizar:{title:"Mizar",owner:"Golmote"},mongodb:{title:"MongoDB",owner:"airs0urce",require:"javascript"},monkey:{title:"Monkey",owner:"Golmote"},moonscript:{title:"MoonScript",alias:"moon",owner:"RunDevelopment"},n1ql:{title:"N1QL",owner:"TMWilds"},n4js:{title:"N4JS",require:"javascript",optional:"jsdoc",alias:"n4jsd",owner:"bsmith-n4"},"nand2tetris-hdl":{title:"Nand To Tetris HDL",owner:"stephanmax"},naniscript:{title:"Naninovel Script",owner:"Elringus",alias:"nani"},nasm:{title:"NASM",owner:"rbmj"},neon:{title:"NEON",owner:"nette"},nevod:{title:"Nevod",owner:"nezaboodka"},nginx:{title:"nginx",owner:"volado"},nim:{title:"Nim",owner:"Golmote"},nix:{title:"Nix",owner:"Golmote"},nsis:{title:"NSIS",owner:"idleberg"},objectivec:{title:"Objective-C",require:"c",alias:"objc",owner:"uranusjr"},ocaml:{title:"OCaml",owner:"Golmote"},odin:{title:"Odin",owner:"edukisto"},opencl:{title:"OpenCL",require:"c",modify:["c","cpp"],owner:"Milania1"},openqasm:{title:"OpenQasm",alias:"qasm",owner:"RunDevelopment"},oz:{title:"Oz",owner:"Golmote"},parigp:{title:"PARI/GP",owner:"Golmote"},parser:{title:"Parser",require:"markup",owner:"Golmote"},pascal:{title:"Pascal",alias:"objectpascal",aliasTitles:{objectpascal:"Object Pascal"},owner:"Golmote"},pascaligo:{title:"Pascaligo",owner:"DefinitelyNotAGoat"},psl:{title:"PATROL Scripting Language",owner:"bertysentry"},pcaxis:{title:"PC-Axis",alias:"px",owner:"RunDevelopment"},peoplecode:{title:"PeopleCode",alias:"pcode",owner:"RunDevelopment"},perl:{title:"Perl",owner:"Golmote"},php:{title:"PHP",require:"markup-templating",owner:"milesj"},phpdoc:{title:"PHPDoc",require:["php","javadoclike"],modify:"php",owner:"RunDevelopment"},"php-extras":{title:"PHP Extras",require:"php",modify:"php",owner:"milesj"},"plant-uml":{title:"PlantUML",alias:"plantuml",owner:"RunDevelopment"},plsql:{title:"PL/SQL",require:"sql",owner:"Golmote"},powerquery:{title:"PowerQuery",alias:["pq","mscript"],owner:"peterbud"},powershell:{title:"PowerShell",owner:"nauzilus"},processing:{title:"Processing",require:"clike",owner:"Golmote"},prolog:{title:"Prolog",owner:"Golmote"},promql:{title:"PromQL",owner:"arendjr"},properties:{title:".properties",owner:"Golmote"},protobuf:{title:"Protocol Buffers",require:"clike",owner:"just-boris"},pug:{title:"Pug",require:["markup","javascript"],optional:["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],owner:"Golmote"},puppet:{title:"Puppet",owner:"Golmote"},pure:{title:"Pure",optional:["c","cpp","fortran"],owner:"Golmote"},purebasic:{title:"PureBasic",require:"clike",alias:"pbfasm",owner:"HeX0R101"},purescript:{title:"PureScript",require:"haskell",alias:"purs",owner:"sriharshachilakapati"},python:{title:"Python",alias:"py",owner:"multipetros"},qsharp:{title:"Q#",require:"clike",alias:"qs",owner:"fedonman"},q:{title:"Q (kdb+ database)",owner:"Golmote"},qml:{title:"QML",require:"javascript",owner:"RunDevelopment"},qore:{title:"Qore",require:"clike",owner:"temnroegg"},r:{title:"R",owner:"Golmote"},racket:{title:"Racket",require:"scheme",alias:"rkt",owner:"RunDevelopment"},cshtml:{title:"Razor C#",alias:"razor",require:["markup","csharp"],optional:["css","css-extras","javascript","js-extras"],owner:"RunDevelopment"},jsx:{title:"React JSX",require:["markup","javascript"],optional:["jsdoc","js-extras","js-templates"],owner:"vkbansal"},tsx:{title:"React TSX",require:["jsx","typescript"]},reason:{title:"Reason",require:"clike",owner:"Golmote"},regex:{title:"Regex",owner:"RunDevelopment"},rego:{title:"Rego",owner:"JordanSh"},renpy:{title:"Ren'py",alias:"rpy",owner:"HyuchiaDiego"},rescript:{title:"ReScript",alias:"res",owner:"vmarcosp"},rest:{title:"reST (reStructuredText)",owner:"Golmote"},rip:{title:"Rip",owner:"ravinggenius"},roboconf:{title:"Roboconf",owner:"Golmote"},robotframework:{title:"Robot Framework",alias:"robot",owner:"RunDevelopment"},ruby:{title:"Ruby",require:"clike",alias:"rb",owner:"samflores"},rust:{title:"Rust",owner:"Golmote"},sas:{title:"SAS",optional:["groovy","lua","sql"],owner:"Golmote"},sass:{title:"Sass (Sass)",require:"css",optional:"css-extras",owner:"Golmote"},scss:{title:"Sass (SCSS)",require:"css",optional:"css-extras",owner:"MoOx"},scala:{title:"Scala",require:"java",owner:"jozic"},scheme:{title:"Scheme",owner:"bacchus123"},"shell-session":{title:"Shell session",require:"bash",alias:["sh-session","shellsession"],owner:"RunDevelopment"},smali:{title:"Smali",owner:"RunDevelopment"},smalltalk:{title:"Smalltalk",owner:"Golmote"},smarty:{title:"Smarty",require:"markup-templating",optional:"php",owner:"Golmote"},sml:{title:"SML",alias:"smlnj",aliasTitles:{smlnj:"SML/NJ"},owner:"RunDevelopment"},solidity:{title:"Solidity (Ethereum)",alias:"sol",require:"clike",owner:"glachaud"},"solution-file":{title:"Solution file",alias:"sln",owner:"RunDevelopment"},soy:{title:"Soy (Closure Template)",require:"markup-templating",owner:"Golmote"},sparql:{title:"SPARQL",require:"turtle",owner:"Triply-Dev",alias:"rq"},"splunk-spl":{title:"Splunk SPL",owner:"RunDevelopment"},sqf:{title:"SQF: Status Quo Function (Arma 3)",require:"clike",owner:"RunDevelopment"},sql:{title:"SQL",owner:"multipetros"},squirrel:{title:"Squirrel",require:"clike",owner:"RunDevelopment"},stan:{title:"Stan",owner:"RunDevelopment"},stata:{title:"Stata Ado",require:["mata","java","python"],owner:"RunDevelopment"},iecst:{title:"Structured Text (IEC 61131-3)",owner:"serhioromano"},stylus:{title:"Stylus",owner:"vkbansal"},supercollider:{title:"SuperCollider",alias:"sclang",owner:"RunDevelopment"},swift:{title:"Swift",owner:"chrischares"},systemd:{title:"Systemd configuration file",owner:"RunDevelopment"},"t4-templating":{title:"T4 templating",owner:"RunDevelopment"},"t4-cs":{title:"T4 Text Templates (C#)",require:["t4-templating","csharp"],alias:"t4",owner:"RunDevelopment"},"t4-vb":{title:"T4 Text Templates (VB)",require:["t4-templating","vbnet"],owner:"RunDevelopment"},tap:{title:"TAP",owner:"isaacs",require:"yaml"},tcl:{title:"Tcl",owner:"PeterChaplin"},tt2:{title:"Template Toolkit 2",require:["clike","markup-templating"],owner:"gflohr"},textile:{title:"Textile",require:"markup",optional:"css",owner:"Golmote"},toml:{title:"TOML",owner:"RunDevelopment"},tremor:{title:"Tremor",alias:["trickle","troy"],owner:"darach",aliasTitles:{trickle:"trickle",troy:"troy"}},turtle:{title:"Turtle",alias:"trig",aliasTitles:{trig:"TriG"},owner:"jakubklimek"},twig:{title:"Twig",require:"markup-templating",owner:"brandonkelly"},typescript:{title:"TypeScript",require:"javascript",optional:"js-templates",alias:"ts",owner:"vkbansal"},typoscript:{title:"TypoScript",alias:"tsconfig",aliasTitles:{tsconfig:"TSConfig"},owner:"dkern"},unrealscript:{title:"UnrealScript",alias:["uscript","uc"],owner:"RunDevelopment"},uorazor:{title:"UO Razor Script",owner:"jaseowns"},uri:{title:"URI",alias:"url",aliasTitles:{url:"URL"},owner:"RunDevelopment"},v:{title:"V",require:"clike",owner:"taggon"},vala:{title:"Vala",require:"clike",optional:"regex",owner:"TemplarVolk"},vbnet:{title:"VB.Net",require:"basic",owner:"Bigsby"},velocity:{title:"Velocity",require:"markup",owner:"Golmote"},verilog:{title:"Verilog",owner:"a-rey"},vhdl:{title:"VHDL",owner:"a-rey"},vim:{title:"vim",owner:"westonganger"},"visual-basic":{title:"Visual Basic",alias:["vb","vba"],aliasTitles:{vba:"VBA"},owner:"Golmote"},warpscript:{title:"WarpScript",owner:"RunDevelopment"},wasm:{title:"WebAssembly",owner:"Golmote"},"web-idl":{title:"Web IDL",alias:"webidl",owner:"RunDevelopment"},wgsl:{title:"WGSL",owner:"Dr4gonthree"},wiki:{title:"Wiki markup",require:"markup",owner:"Golmote"},wolfram:{title:"Wolfram language",alias:["mathematica","nb","wl"],aliasTitles:{mathematica:"Mathematica",nb:"Mathematica Notebook"},owner:"msollami"},wren:{title:"Wren",owner:"clsource"},xeora:{title:"Xeora",require:"markup",alias:"xeoracube",aliasTitles:{xeoracube:"XeoraCube"},owner:"freakmaxi"},"xml-doc":{title:"XML doc (.net)",require:"markup",modify:["csharp","fsharp","vbnet"],owner:"RunDevelopment"},xojo:{title:"Xojo (REALbasic)",owner:"Golmote"},xquery:{title:"XQuery",require:"markup",owner:"Golmote"},yaml:{title:"YAML",alias:"yml",owner:"hason"},yang:{title:"YANG",owner:"RunDevelopment"},zig:{title:"Zig",owner:"RunDevelopment"}},plugins:{meta:{path:"plugins/{id}/prism-{id}",link:"plugins/{id}/"},"line-highlight":{title:"Line Highlight",description:"Highlights specific lines and/or line ranges."},"line-numbers":{title:"Line Numbers",description:"Line number at the beginning of code lines.",owner:"kuba-kubula"},"show-invisibles":{title:"Show Invisibles",description:"Show hidden characters such as tabs and line breaks.",optional:["autolinker","data-uri-highlight"]},autolinker:{title:"Autolinker",description:"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},wpd:{title:"WebPlatform Docs",description:'Makes tokens link to <a href="https://webplatform.github.io/docs/">WebPlatform.org documentation</a>. The links open in a new tab.'},"custom-class":{title:"Custom Class",description:"This plugin allows you to prefix Prism's default classes (<code>.comment</code> can become <code>.namespace--comment</code>) or replace them with your defined ones (like <code>.editor__comment</code>). You can even add new classes.",owner:"dvkndn",noCSS:!0},"file-highlight":{title:"File Highlight",description:"Fetch external files and highlight them with Prism. Used on the Prism website itself.",noCSS:!0},"show-language":{title:"Show Language",description:"Display the highlighted language in code blocks (inline code does not show the label).",owner:"nauzilus",noCSS:!0,require:"toolbar"},"jsonp-highlight":{title:"JSONP Highlight",description:"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).",noCSS:!0,owner:"nauzilus"},"highlight-keywords":{title:"Highlight Keywords",description:"Adds special CSS classes for each keyword for fine-grained highlighting.",owner:"vkbansal",noCSS:!0},"remove-initial-line-feed":{title:"Remove initial line feed",description:"Removes the initial line feed in code blocks.",owner:"Golmote",noCSS:!0},"inline-color":{title:"Inline color",description:"Adds a small inline preview for colors in style sheets.",require:"css-extras",owner:"RunDevelopment"},previewers:{title:"Previewers",description:"Previewers for angles, colors, gradients, easing and time.",require:"css-extras",owner:"Golmote"},autoloader:{title:"Autoloader",description:"Automatically loads the needed languages to highlight the code blocks.",owner:"Golmote",noCSS:!0},"keep-markup":{title:"Keep Markup",description:"Prevents custom markup from being dropped out during highlighting.",owner:"Golmote",optional:"normalize-whitespace",noCSS:!0},"command-line":{title:"Command Line",description:"Display a command line with a prompt and, optionally, the output/response from the commands.",owner:"chriswells0"},"unescaped-markup":{title:"Unescaped Markup",description:"Write markup without having to escape anything."},"normalize-whitespace":{title:"Normalize Whitespace",description:"Supports multiple operations to normalize whitespace in code blocks.",owner:"zeitgeist87",optional:"unescaped-markup",noCSS:!0},"data-uri-highlight":{title:"Data-URI Highlight",description:"Highlights data-URI contents.",owner:"Golmote",noCSS:!0},toolbar:{title:"Toolbar",description:"Attach a toolbar for plugins to easily register buttons on the top of a code block.",owner:"mAAdhaTTah"},"copy-to-clipboard":{title:"Copy to Clipboard Button",description:"Add a button that copies the code block to the clipboard when clicked.",owner:"mAAdhaTTah",require:"toolbar",noCSS:!0},"download-button":{title:"Download Button",description:"A button in the toolbar of a code block adding a convenient way to download a code file.",owner:"Golmote",require:"toolbar",noCSS:!0},"match-braces":{title:"Match braces",description:"Highlights matching braces.",owner:"RunDevelopment"},"diff-highlight":{title:"Diff Highlight",description:"Highlights the code inside diff blocks.",owner:"RunDevelopment",require:"diff"},"filter-highlight-all":{title:"Filter highlightAll",description:"Filters the elements the <code>highlightAll</code> and <code>highlightAllUnder</code> methods actually highlight.",owner:"RunDevelopment",noCSS:!0},treeview:{title:"Treeview",description:"A language with special styles to highlight file system tree structures.",owner:"Golmote"}}};t.exports&&(t.exports=e)})(U_)),U_.exports}var IG=LG();const EN=ts(IG),ic={bold:{labelKey:"bold",icon:"format_bold",inline:!0},italic:{labelKey:"italic",icon:"format_italic",inline:!0},strikethrough:{labelKey:"strikethrough",icon:"strikethrough_s",inline:!0},code:{labelKey:"code",icon:"code",inline:!0},link:{labelKey:"link",icon:"link",inline:!0},paragraph:{labelKey:"paragraph",icon:"format_paragraph",inline:!1},"heading-1":{labelKey:"heading_1",icon:"format_h1",inline:!1},"heading-2":{labelKey:"heading_2",icon:"format_h2",inline:!1},"heading-3":{labelKey:"heading_3",icon:"format_h3",inline:!1},"heading-4":{labelKey:"heading_4",icon:"format_h4",inline:!1},"heading-5":{labelKey:"heading_5",icon:"format_h5",inline:!1},"heading-6":{labelKey:"heading_6",icon:"format_h6",inline:!1},"bulleted-list":{labelKey:"bulleted_list",icon:"format_list_bulleted",inline:!1},"numbered-list":{labelKey:"numbered_list",icon:"format_list_numbered",inline:!1},blockquote:{labelKey:"blockquote",icon:"format_quote",inline:!1},"code-block":{labelKey:"code_block",icon:"code_blocks",inline:!1}},TN=["bold","italic","strikethrough","code"],$N=[...TN,"link"],l1=["paragraph","heading-1","heading-2","heading-3","heading-4","heading-5","heading-6","bulleted-list","numbered-list","blockquote","code-block"],c$=["image","linked-image"],AN=/^(?:\|)(.+)(?:\|)\s?$/,NG=/^(\| ?:?-*:? ?)+\|\s?$/;function RG(t){const e=t.getFirstChild();return fh(e)?e.getChildrenSize():0}const CN=t=>{t=t.replace(/\\n/g,`
|
|
404
|
+
`)}})(t,n)(e)}const i1=/^(\d+(?:\.\d+)?)px$/,ga={BOTH:3,NO_STATUS:0,ROW:1};class Td extends ir{__colSpan;__rowSpan;__headerState;__width;__backgroundColor;__verticalAlign;static getType(){return"tablecell"}static clone(e){return new Td(e.__headerState,e.__colSpan,e.__width,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__rowSpan=e.__rowSpan,this.__backgroundColor=e.__backgroundColor,this.__verticalAlign=e.__verticalAlign}static importDOM(){return{td:e=>({conversion:o$,priority:0}),th:e=>({conversion:o$,priority:0})}}static importJSON(e){return o1().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setHeaderStyles(e.headerState).setColSpan(e.colSpan||1).setRowSpan(e.rowSpan||1).setWidth(e.width||void 0).setBackgroundColor(e.backgroundColor||null).setVerticalAlign(e.verticalAlign||void 0)}constructor(e=ga.NO_STATUS,n=1,r,i){super(i),this.__colSpan=n,this.__rowSpan=1,this.__headerState=e,this.__width=r,this.__backgroundColor=null,this.__verticalAlign=void 0}createDOM(e){const n=document.createElement(this.getTag());return this.__width&&(n.style.width=`${this.__width}px`),this.__colSpan>1&&(n.colSpan=this.__colSpan),this.__rowSpan>1&&(n.rowSpan=this.__rowSpan),this.__backgroundColor!==null&&(n.style.backgroundColor=this.__backgroundColor),rw(this.__verticalAlign)&&(n.style.verticalAlign=this.__verticalAlign),Rr(n,e.theme.tableCell,this.hasHeader()&&e.theme.tableCellHeader),n}exportDOM(e){const n=super.exportDOM(e);if(In(n.element)){const r=n.element;r.setAttribute("data-temporary-table-cell-lexical-key",this.getKey()),r.style.border="1px solid black",this.__colSpan>1&&(r.colSpan=this.__colSpan),this.__rowSpan>1&&(r.rowSpan=this.__rowSpan),r.style.width=`${this.getWidth()||75}px`,r.style.verticalAlign=this.getVerticalAlign()||"top",r.style.textAlign="start",this.__backgroundColor===null&&this.hasHeader()&&(r.style.backgroundColor="#f2f3f5")}return n}exportJSON(){return{...super.exportJSON(),...rw(this.__verticalAlign)&&{verticalAlign:this.__verticalAlign},backgroundColor:this.getBackgroundColor(),colSpan:this.__colSpan,headerState:this.__headerState,rowSpan:this.__rowSpan,width:this.getWidth()}}getColSpan(){return this.getLatest().__colSpan}setColSpan(e){const n=this.getWritable();return n.__colSpan=e,n}getRowSpan(){return this.getLatest().__rowSpan}setRowSpan(e){const n=this.getWritable();return n.__rowSpan=e,n}getTag(){return this.hasHeader()?"th":"td"}setHeaderStyles(e,n=ga.BOTH){const r=this.getWritable();return r.__headerState=e&n|r.__headerState&~n,r}getHeaderStyles(){return this.getLatest().__headerState}setWidth(e){const n=this.getWritable();return n.__width=e,n}getWidth(){return this.getLatest().__width}getBackgroundColor(){return this.getLatest().__backgroundColor}setBackgroundColor(e){const n=this.getWritable();return n.__backgroundColor=e,n}getVerticalAlign(){return this.getLatest().__verticalAlign}setVerticalAlign(e){const n=this.getWritable();return n.__verticalAlign=e||void 0,n}toggleHeaderStyle(e){const n=this.getWritable();return(n.__headerState&e)===e?n.__headerState-=e:n.__headerState+=e,n}hasHeaderState(e){return(this.getHeaderStyles()&e)===e}hasHeader(){return this.getLatest().__headerState!==ga.NO_STATUS}updateDOM(e){return e.__headerState!==this.__headerState||e.__width!==this.__width||e.__colSpan!==this.__colSpan||e.__rowSpan!==this.__rowSpan||e.__backgroundColor!==this.__backgroundColor||e.__verticalAlign!==this.__verticalAlign}isShadowRoot(){return!0}collapseAtStart(){return!0}canBeEmpty(){return!1}canIndent(){return!1}}function rw(t){return t==="middle"||t==="bottom"}function o$(t){const e=t,n=t.nodeName.toLowerCase();let r;i1.test(e.style.width)&&(r=parseFloat(e.style.width));const i=o1(n==="th"?ga.ROW:ga.NO_STATUS,e.colSpan,r);i.__rowSpan=e.rowSpan;const o=e.style.backgroundColor;o!==""&&(i.__backgroundColor=o);const a=e.style.verticalAlign;rw(a)&&(i.__verticalAlign=a);const s=e.style,l=(s&&s.textDecoration||"").split(" "),u=s.fontWeight==="700"||s.fontWeight==="bold",d=l.includes("line-through"),f=s.fontStyle==="italic",h=l.includes("underline");return{after:p=>{const g=[];let m=null;const v=()=>{if(m){const b=m.getFirstChild();Bn(b)&&m.getChildrenSize()===1&&b.remove()}};for(const b of p)u9(b)||Ye(b)||Bn(b)?(Ye(b)&&(u&&b.toggleFormat("bold"),d&&b.toggleFormat("strikethrough"),f&&b.toggleFormat("italic"),h&&b.toggleFormat("underline")),m?m.append(b):(m=Tn().append(b),g.push(m))):(g.push(b),v(),m=null);return v(),g.length===0&&g.push(Tn()),g},node:i}}function o1(t=ga.NO_STATUS,e=1,n){return Di(new Td(t,e,n))}function rc(t){return t instanceof Td}function iw(t,...e){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",t);for(const i of e)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}class $d extends ir{__height;static getType(){return"tablerow"}static clone(e){return new $d(e.__height,e.__key)}static importDOM(){return{tr:e=>({conversion:EG,priority:0})}}static importJSON(e){return a1().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setHeight(e.height)}constructor(e,n){super(n),this.__height=e}exportJSON(){const e=this.getHeight();return{...super.exportJSON(),...e===void 0?void 0:{height:e}}}createDOM(e){const n=document.createElement("tr");return this.__height&&(n.style.height=`${this.__height}px`),Rr(n,e.theme.tableRow),n}extractWithChild(e,n,r){return r==="html"}isShadowRoot(){return!0}setHeight(e){const n=this.getWritable();return n.__height=e,n}getHeight(){return this.getLatest().__height}updateDOM(e){return e.__height!==this.__height}canBeEmpty(){return!1}canIndent(){return!1}}function EG(t){const e=t;let n;return i1.test(e.style.height)&&(n=parseFloat(e.style.height)),{after:r=>jI(r,rc),node:a1(n)}}function a1(t){return Di(new $d(t))}function fh(t){return t instanceof $d}const SN=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,TG=SN&&"documentMode"in document?document.documentMode:null;SN&&"InputEvent"in window&&!TG&&new window.InputEvent("input");function $G(t,e,n){const r=[];let i=null,o=null;function a(l){let u=r[l];return u===void 0&&(r[l]=u=[]),u}const s=t.getChildren();for(let l=0;l<s.length;l++){const u=s[l];fh(u)||iw(209);const d=a(l);for(let f=u.getFirstChild(),h=0;f!=null;f=f.getNextSibling()){for(rc(f)||iw(147);d[h]!==void 0;)h++;const p={cell:f,startColumn:h,startRow:l},{__rowSpan:g,__colSpan:m}=f;for(let v=0;v<g&&!(l+v>=s.length);v++){const b=a(l+v);for(let y=0;y<m;y++)b[h+y]=p}}}return[r,i,o]}function Vd(t){return In(t)&&t.nodeName==="TABLE"}function AG(t,e){for(let n=e,r=null;n!==null;n=n.getParent()){if(t.is(n))return r;rc(n)&&(r=n)}return null}function CG(t,e,n){return AG(t,Us(e,n))}function a$(t,e,n){if(!e.theme.tableAlignment)return;const r=[],i=[];for(const o of["center","right"]){const a=e.theme.tableAlignment[o];a&&(o===n?i:r).push(a)}Pl(t,...r),Rr(t,...i)}const PG=new WeakSet;function s$(t=Yh()){return PG.has(t)}class Ad extends ir{__rowStriping;__frozenColumnCount;__frozenRowCount;__colWidths;static getType(){return"table"}getColWidths(){return this.getLatest().__colWidths}setColWidths(e){const n=this.getWritable();return n.__colWidths=e,n}static clone(e){return new Ad(e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__colWidths=e.__colWidths,this.__rowStriping=e.__rowStriping,this.__frozenColumnCount=e.__frozenColumnCount,this.__frozenRowCount=e.__frozenRowCount}static importDOM(){return{table:e=>({conversion:OG,priority:1})}}static importJSON(e){return s1().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setRowStriping(e.rowStriping||!1).setFrozenColumns(e.frozenColumnCount||0).setFrozenRows(e.frozenRowCount||0).setColWidths(e.colWidths)}constructor(e){super(e),this.__rowStriping=!1,this.__frozenColumnCount=0,this.__frozenRowCount=0,this.__colWidths=void 0}exportJSON(){return{...super.exportJSON(),colWidths:this.getColWidths(),frozenColumnCount:this.__frozenColumnCount?this.__frozenColumnCount:void 0,frozenRowCount:this.__frozenRowCount?this.__frozenRowCount:void 0,rowStriping:this.__rowStriping?this.__rowStriping:void 0}}extractWithChild(e,n,r){return r==="html"}getDOMSlot(e){const n=Vd(e)?e:e.querySelector("table");return Vd(n)||iw(229),super.getDOMSlot(e).withElement(n).withAfter(n.querySelector("colgroup"))}createDOM(e,n){const r=document.createElement("table");this.__style&&(r.style.cssText=this.__style);const i=document.createElement("colgroup");if(r.appendChild(i),m9(i),Rr(r,e.theme.table),this.updateTableElement(null,r,e),s$(n)){const o=document.createElement("div"),a=e.theme.tableScrollableWrapper;return a?Rr(o,a):o.style.cssText="overflow-x: auto;",o.appendChild(r),this.updateTableWrapper(null,o,r,e),o}return r}updateTableWrapper(e,n,r,i){this.__frozenColumnCount!==(e?e.__frozenColumnCount:0)&&(function(o,a,s,l){l>0?(Rr(o,s.theme.tableFrozenColumn),a.setAttribute("data-lexical-frozen-column","true")):(Pl(o,s.theme.tableFrozenColumn),a.removeAttribute("data-lexical-frozen-column"))})(n,r,i,this.__frozenColumnCount),this.__frozenRowCount!==(e?e.__frozenRowCount:0)&&(function(o,a,s,l){l>0?(Rr(o,s.theme.tableFrozenRow),a.setAttribute("data-lexical-frozen-row","true")):(Pl(o,s.theme.tableFrozenRow),a.removeAttribute("data-lexical-frozen-row"))})(n,r,i,this.__frozenRowCount)}updateTableElement(e,n,r){this.__style!==(e?e.__style:"")&&(n.style.cssText=this.__style),this.__rowStriping!==(!!e&&e.__rowStriping)&&(function(i,o,a){a?(Rr(i,o.theme.tableRowStriping),i.setAttribute("data-lexical-row-striping","true")):(Pl(i,o.theme.tableRowStriping),i.removeAttribute("data-lexical-row-striping"))})(n,r,this.__rowStriping),(function(i,o,a,s){const l=i.querySelector("colgroup");if(!l)return;const u=[];for(let d=0;d<a;d++){const f=document.createElement("col"),h=s&&s[d];h&&(f.style.width=`${h}px`),u.push(f)}l.replaceChildren(...u)})(n,0,this.getColumnCount(),this.getColWidths()),a$(n,r,this.getFormatType())}updateDOM(e,n,r){const i=this.getDOMSlot(n).element;return n===i===s$()||(In(o=n)&&o.nodeName==="DIV"&&this.updateTableWrapper(e,n,i,r),this.updateTableElement(e,i,r),!1);var o}exportDOM(e){const n=super.exportDOM(e),{element:r}=n;return{after:i=>{if(n.after&&(i=n.after(i)),!Vd(i)&&In(i)&&(i=i.querySelector("table")),!Vd(i))return null;a$(i,e._config,this.getFormatType());const[o]=$G(this),a=new Map;for(const d of o)for(const f of d){const h=f.cell.getKey();a.has(h)||a.set(h,{colSpan:f.cell.getColSpan(),startColumn:f.startColumn})}const s=new Set;for(const d of i.querySelectorAll(":scope > tr > [data-temporary-table-cell-lexical-key]")){const f=d.getAttribute("data-temporary-table-cell-lexical-key");if(f){const h=a.get(f);if(d.removeAttribute("data-temporary-table-cell-lexical-key"),h){a.delete(f);for(let p=0;p<h.colSpan;p++)s.add(p+h.startColumn)}}}const l=i.querySelector(":scope > colgroup");if(l){const d=Array.from(i.querySelectorAll(":scope > colgroup > col")).filter((f,h)=>s.has(h));l.replaceChildren(...d)}const u=i.querySelectorAll(":scope > tr");if(u.length>0){const d=document.createElement("tbody");for(const f of u)d.appendChild(f);i.append(d)}return i},element:!Vd(r)&&In(r)?r.querySelector("table"):r}}canBeEmpty(){return!1}isShadowRoot(){return!0}getCordsFromCellNode(e,n){const{rows:r,domRows:i}=n;for(let o=0;o<r;o++){const a=i[o];if(a!=null)for(let s=0;s<a.length;s++){const l=a[s];if(l==null)continue;const{elem:u}=l,d=CG(this,u);if(d!==null&&e.is(d))return{x:s,y:o}}}throw new Error("Cell not found in table.")}getDOMCellFromCords(e,n,r){const{domRows:i}=r,o=i[n];if(o==null)return null;const a=o[e<o.length?e:o.length-1];return a??null}getDOMCellFromCordsOrThrow(e,n,r){const i=this.getDOMCellFromCords(e,n,r);if(!i)throw new Error("Cell not found at cords.");return i}getCellNodeFromCords(e,n,r){const i=this.getDOMCellFromCords(e,n,r);if(i==null)return null;const o=Us(i.elem);return rc(o)?o:null}getCellNodeFromCordsOrThrow(e,n,r){const i=this.getCellNodeFromCords(e,n,r);if(!i)throw new Error("Node at cords not TableCellNode.");return i}getRowStriping(){return!!this.getLatest().__rowStriping}setRowStriping(e){const n=this.getWritable();return n.__rowStriping=e,n}setFrozenColumns(e){const n=this.getWritable();return n.__frozenColumnCount=e,n}getFrozenColumns(){return this.getLatest().__frozenColumnCount}setFrozenRows(e){const n=this.getWritable();return n.__frozenRowCount=e,n}getFrozenRows(){return this.getLatest().__frozenRowCount}canSelectBefore(){return!0}canIndent(){return!1}getColumnCount(){const e=this.getFirstChild();if(!e)return 0;let n=0;return e.getChildren().forEach(r=>{rc(r)&&(n+=r.getColSpan())}),n}}function OG(t){const e=s1();t.hasAttribute("data-lexical-row-striping")&&e.setRowStriping(!0),t.hasAttribute("data-lexical-frozen-column")&&e.setFrozenColumns(1),t.hasAttribute("data-lexical-frozen-row")&&e.setFrozenRows(1);const n=t.querySelector(":scope > colgroup");if(n){let r=[];for(const i of n.querySelectorAll(":scope > col")){let o=i.style.width||"";if(!i1.test(o)&&(o=i.getAttribute("width")||"",!/^\d+$/.test(o))){r=void 0;break}r.push(parseFloat(o))}r&&e.setColWidths(r)}return{after:r=>jI(r,fh),node:e}}function s1(){return Di(new Ad)}function j_(t){return t instanceof Ad}var U_={exports:{}},l$;function LG(){return l$||(l$=1,(function(t){var e={core:{meta:{path:"components/prism-core.js",option:"mandatory"},core:"Core"},themes:{meta:{path:"themes/{id}.css",link:"index.html?theme={id}",exclusive:!0},prism:{title:"Default",option:"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{title:"Okaidia",owner:"ocodia"},"prism-twilight":{title:"Twilight",owner:"remybach"},"prism-coy":{title:"Coy",owner:"tshedor"},"prism-solarizedlight":{title:"Solarized Light",owner:"hectormatos2011 "},"prism-tomorrow":{title:"Tomorrow Night",owner:"Rosey"}},languages:{meta:{path:"components/prism-{id}",noCSS:!0,examplesPath:"examples/prism-{id}",addCheckAll:!0},markup:{title:"Markup",alias:["html","xml","svg","mathml","ssml","atom","rss"],aliasTitles:{html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",atom:"Atom",rss:"RSS"},option:"default"},css:{title:"CSS",option:"default",modify:"markup"},clike:{title:"C-like",option:"default"},javascript:{title:"JavaScript",require:"clike",modify:"markup",optional:"regex",alias:"js",option:"default"},abap:{title:"ABAP",owner:"dellagustin"},abnf:{title:"ABNF",owner:"RunDevelopment"},actionscript:{title:"ActionScript",require:"javascript",modify:"markup",owner:"Golmote"},ada:{title:"Ada",owner:"Lucretia"},agda:{title:"Agda",owner:"xy-ren"},al:{title:"AL",owner:"RunDevelopment"},antlr4:{title:"ANTLR4",alias:"g4",owner:"RunDevelopment"},apacheconf:{title:"Apache Configuration",owner:"GuiTeK"},apex:{title:"Apex",require:["clike","sql"],owner:"RunDevelopment"},apl:{title:"APL",owner:"ngn"},applescript:{title:"AppleScript",owner:"Golmote"},aql:{title:"AQL",owner:"RunDevelopment"},arduino:{title:"Arduino",require:"cpp",alias:"ino",owner:"dkern"},arff:{title:"ARFF",owner:"Golmote"},armasm:{title:"ARM Assembly",alias:"arm-asm",owner:"RunDevelopment"},arturo:{title:"Arturo",alias:"art",optional:["bash","css","javascript","markup","markdown","sql"],owner:"drkameleon"},asciidoc:{alias:"adoc",title:"AsciiDoc",owner:"Golmote"},aspnet:{title:"ASP.NET (C#)",require:["markup","csharp"],owner:"nauzilus"},asm6502:{title:"6502 Assembly",owner:"kzurawel"},asmatmel:{title:"Atmel AVR Assembly",owner:"cerkit"},autohotkey:{title:"AutoHotkey",owner:"aviaryan"},autoit:{title:"AutoIt",owner:"Golmote"},avisynth:{title:"AviSynth",alias:"avs",owner:"Zinfidel"},"avro-idl":{title:"Avro IDL",alias:"avdl",owner:"RunDevelopment"},awk:{title:"AWK",alias:"gawk",aliasTitles:{gawk:"GAWK"},owner:"RunDevelopment"},bash:{title:"Bash",alias:["sh","shell"],aliasTitles:{sh:"Shell",shell:"Shell"},owner:"zeitgeist87"},basic:{title:"BASIC",owner:"Golmote"},batch:{title:"Batch",owner:"Golmote"},bbcode:{title:"BBcode",alias:"shortcode",aliasTitles:{shortcode:"Shortcode"},owner:"RunDevelopment"},bbj:{title:"BBj",owner:"hyyan"},bicep:{title:"Bicep",owner:"johnnyreilly"},birb:{title:"Birb",require:"clike",owner:"Calamity210"},bison:{title:"Bison",require:"c",owner:"Golmote"},bnf:{title:"BNF",alias:"rbnf",aliasTitles:{rbnf:"RBNF"},owner:"RunDevelopment"},bqn:{title:"BQN",owner:"yewscion"},brainfuck:{title:"Brainfuck",owner:"Golmote"},brightscript:{title:"BrightScript",owner:"RunDevelopment"},bro:{title:"Bro",owner:"wayward710"},bsl:{title:"BSL (1C:Enterprise)",alias:"oscript",aliasTitles:{oscript:"OneScript"},owner:"Diversus23"},c:{title:"C",require:"clike",owner:"zeitgeist87"},csharp:{title:"C#",require:"clike",alias:["cs","dotnet"],owner:"mvalipour"},cpp:{title:"C++",require:"c",owner:"zeitgeist87"},cfscript:{title:"CFScript",require:"clike",alias:"cfc",owner:"mjclemente"},chaiscript:{title:"ChaiScript",require:["clike","cpp"],owner:"RunDevelopment"},cil:{title:"CIL",owner:"sbrl"},cilkc:{title:"Cilk/C",require:"c",alias:"cilk-c",owner:"OpenCilk"},cilkcpp:{title:"Cilk/C++",require:"cpp",alias:["cilk-cpp","cilk"],owner:"OpenCilk"},clojure:{title:"Clojure",owner:"troglotit"},cmake:{title:"CMake",owner:"mjrogozinski"},cobol:{title:"COBOL",owner:"RunDevelopment"},coffeescript:{title:"CoffeeScript",require:"javascript",alias:"coffee",owner:"R-osey"},concurnas:{title:"Concurnas",alias:"conc",owner:"jasontatton"},csp:{title:"Content-Security-Policy",owner:"ScottHelme"},cooklang:{title:"Cooklang",owner:"ahue"},coq:{title:"Coq",owner:"RunDevelopment"},crystal:{title:"Crystal",require:"ruby",owner:"MakeNowJust"},"css-extras":{title:"CSS Extras",require:"css",modify:"css",owner:"milesj"},csv:{title:"CSV",owner:"RunDevelopment"},cue:{title:"CUE",owner:"RunDevelopment"},cypher:{title:"Cypher",owner:"RunDevelopment"},d:{title:"D",require:"clike",owner:"Golmote"},dart:{title:"Dart",require:"clike",owner:"Golmote"},dataweave:{title:"DataWeave",owner:"machaval"},dax:{title:"DAX",owner:"peterbud"},dhall:{title:"Dhall",owner:"RunDevelopment"},diff:{title:"Diff",owner:"uranusjr"},django:{title:"Django/Jinja2",require:"markup-templating",alias:"jinja2",owner:"romanvm"},"dns-zone-file":{title:"DNS zone file",owner:"RunDevelopment",alias:"dns-zone"},docker:{title:"Docker",alias:"dockerfile",owner:"JustinBeckwith"},dot:{title:"DOT (Graphviz)",alias:"gv",optional:"markup",owner:"RunDevelopment"},ebnf:{title:"EBNF",owner:"RunDevelopment"},editorconfig:{title:"EditorConfig",owner:"osipxd"},eiffel:{title:"Eiffel",owner:"Conaclos"},ejs:{title:"EJS",require:["javascript","markup-templating"],owner:"RunDevelopment",alias:"eta",aliasTitles:{eta:"Eta"}},elixir:{title:"Elixir",owner:"Golmote"},elm:{title:"Elm",owner:"zwilias"},etlua:{title:"Embedded Lua templating",require:["lua","markup-templating"],owner:"RunDevelopment"},erb:{title:"ERB",require:["ruby","markup-templating"],owner:"Golmote"},erlang:{title:"Erlang",owner:"Golmote"},"excel-formula":{title:"Excel Formula",alias:["xlsx","xls"],owner:"RunDevelopment"},fsharp:{title:"F#",require:"clike",owner:"simonreynolds7"},factor:{title:"Factor",owner:"catb0t"},false:{title:"False",owner:"edukisto"},"firestore-security-rules":{title:"Firestore security rules",require:"clike",owner:"RunDevelopment"},flow:{title:"Flow",require:"javascript",owner:"Golmote"},fortran:{title:"Fortran",owner:"Golmote"},ftl:{title:"FreeMarker Template Language",require:"markup-templating",owner:"RunDevelopment"},gml:{title:"GameMaker Language",alias:"gamemakerlanguage",require:"clike",owner:"LiarOnce"},gap:{title:"GAP (CAS)",owner:"RunDevelopment"},gcode:{title:"G-code",owner:"RunDevelopment"},gdscript:{title:"GDScript",owner:"RunDevelopment"},gedcom:{title:"GEDCOM",owner:"Golmote"},gettext:{title:"gettext",alias:"po",owner:"RunDevelopment"},gherkin:{title:"Gherkin",owner:"hason"},git:{title:"Git",owner:"lgiraudel"},glsl:{title:"GLSL",require:"c",owner:"Golmote"},gn:{title:"GN",alias:"gni",owner:"RunDevelopment"},"linker-script":{title:"GNU Linker Script",alias:"ld",owner:"RunDevelopment"},go:{title:"Go",require:"clike",owner:"arnehormann"},"go-module":{title:"Go module",alias:"go-mod",owner:"RunDevelopment"},gradle:{title:"Gradle",require:"clike",owner:"zeabdelkhalek-badido18"},graphql:{title:"GraphQL",optional:"markdown",owner:"Golmote"},groovy:{title:"Groovy",require:"clike",owner:"robfletcher"},haml:{title:"Haml",require:"ruby",optional:["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],owner:"Golmote"},handlebars:{title:"Handlebars",require:"markup-templating",alias:["hbs","mustache"],aliasTitles:{mustache:"Mustache"},owner:"Golmote"},haskell:{title:"Haskell",alias:"hs",owner:"bholst"},haxe:{title:"Haxe",require:"clike",optional:"regex",owner:"Golmote"},hcl:{title:"HCL",owner:"outsideris"},hlsl:{title:"HLSL",require:"c",owner:"RunDevelopment"},hoon:{title:"Hoon",owner:"matildepark"},http:{title:"HTTP",optional:["csp","css","hpkp","hsts","javascript","json","markup","uri"],owner:"danielgtaylor"},hpkp:{title:"HTTP Public-Key-Pins",owner:"ScottHelme"},hsts:{title:"HTTP Strict-Transport-Security",owner:"ScottHelme"},ichigojam:{title:"IchigoJam",owner:"BlueCocoa"},icon:{title:"Icon",owner:"Golmote"},"icu-message-format":{title:"ICU Message Format",owner:"RunDevelopment"},idris:{title:"Idris",alias:"idr",owner:"KeenS",require:"haskell"},ignore:{title:".ignore",owner:"osipxd",alias:["gitignore","hgignore","npmignore"],aliasTitles:{gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore"}},inform7:{title:"Inform 7",owner:"Golmote"},ini:{title:"Ini",owner:"aviaryan"},io:{title:"Io",owner:"AlesTsurko"},j:{title:"J",owner:"Golmote"},java:{title:"Java",require:"clike",owner:"sherblot"},javadoc:{title:"JavaDoc",require:["markup","java","javadoclike"],modify:"java",optional:"scala",owner:"RunDevelopment"},javadoclike:{title:"JavaDoc-like",modify:["java","javascript","php"],owner:"RunDevelopment"},javastacktrace:{title:"Java stack trace",owner:"RunDevelopment"},jexl:{title:"Jexl",owner:"czosel"},jolie:{title:"Jolie",require:"clike",owner:"thesave"},jq:{title:"JQ",owner:"RunDevelopment"},jsdoc:{title:"JSDoc",require:["javascript","javadoclike","typescript"],modify:"javascript",optional:["actionscript","coffeescript"],owner:"RunDevelopment"},"js-extras":{title:"JS Extras",require:"javascript",modify:"javascript",optional:["actionscript","coffeescript","flow","n4js","typescript"],owner:"RunDevelopment"},json:{title:"JSON",alias:"webmanifest",aliasTitles:{webmanifest:"Web App Manifest"},owner:"CupOfTea696"},json5:{title:"JSON5",require:"json",owner:"RunDevelopment"},jsonp:{title:"JSONP",require:"json",owner:"RunDevelopment"},jsstacktrace:{title:"JS stack trace",owner:"sbrl"},"js-templates":{title:"JS Templates",require:"javascript",modify:"javascript",optional:["css","css-extras","graphql","markdown","markup","sql"],owner:"RunDevelopment"},julia:{title:"Julia",owner:"cdagnino"},keepalived:{title:"Keepalived Configure",owner:"dev-itsheng"},keyman:{title:"Keyman",owner:"mcdurdin"},kotlin:{title:"Kotlin",alias:["kt","kts"],aliasTitles:{kts:"Kotlin Script"},require:"clike",owner:"Golmote"},kumir:{title:"KuMir (КуМир)",alias:"kum",owner:"edukisto"},kusto:{title:"Kusto",owner:"RunDevelopment"},latex:{title:"LaTeX",alias:["tex","context"],aliasTitles:{tex:"TeX",context:"ConTeXt"},owner:"japborst"},latte:{title:"Latte",require:["clike","markup-templating","php"],owner:"nette"},less:{title:"Less",require:"css",optional:"css-extras",owner:"Golmote"},lilypond:{title:"LilyPond",require:"scheme",alias:"ly",owner:"RunDevelopment"},liquid:{title:"Liquid",require:"markup-templating",owner:"cinhtau"},lisp:{title:"Lisp",alias:["emacs","elisp","emacs-lisp"],owner:"JuanCaicedo"},livescript:{title:"LiveScript",owner:"Golmote"},llvm:{title:"LLVM IR",owner:"porglezomp"},log:{title:"Log file",optional:"javastacktrace",owner:"RunDevelopment"},lolcode:{title:"LOLCODE",owner:"Golmote"},lua:{title:"Lua",owner:"Golmote"},magma:{title:"Magma (CAS)",owner:"RunDevelopment"},makefile:{title:"Makefile",owner:"Golmote"},markdown:{title:"Markdown",require:"markup",optional:"yaml",alias:"md",owner:"Golmote"},"markup-templating":{title:"Markup templating",require:"markup",owner:"Golmote"},mata:{title:"Mata",owner:"RunDevelopment"},matlab:{title:"MATLAB",owner:"Golmote"},maxscript:{title:"MAXScript",owner:"RunDevelopment"},mel:{title:"MEL",owner:"Golmote"},mermaid:{title:"Mermaid",owner:"RunDevelopment"},metafont:{title:"METAFONT",owner:"LaeriExNihilo"},mizar:{title:"Mizar",owner:"Golmote"},mongodb:{title:"MongoDB",owner:"airs0urce",require:"javascript"},monkey:{title:"Monkey",owner:"Golmote"},moonscript:{title:"MoonScript",alias:"moon",owner:"RunDevelopment"},n1ql:{title:"N1QL",owner:"TMWilds"},n4js:{title:"N4JS",require:"javascript",optional:"jsdoc",alias:"n4jsd",owner:"bsmith-n4"},"nand2tetris-hdl":{title:"Nand To Tetris HDL",owner:"stephanmax"},naniscript:{title:"Naninovel Script",owner:"Elringus",alias:"nani"},nasm:{title:"NASM",owner:"rbmj"},neon:{title:"NEON",owner:"nette"},nevod:{title:"Nevod",owner:"nezaboodka"},nginx:{title:"nginx",owner:"volado"},nim:{title:"Nim",owner:"Golmote"},nix:{title:"Nix",owner:"Golmote"},nsis:{title:"NSIS",owner:"idleberg"},objectivec:{title:"Objective-C",require:"c",alias:"objc",owner:"uranusjr"},ocaml:{title:"OCaml",owner:"Golmote"},odin:{title:"Odin",owner:"edukisto"},opencl:{title:"OpenCL",require:"c",modify:["c","cpp"],owner:"Milania1"},openqasm:{title:"OpenQasm",alias:"qasm",owner:"RunDevelopment"},oz:{title:"Oz",owner:"Golmote"},parigp:{title:"PARI/GP",owner:"Golmote"},parser:{title:"Parser",require:"markup",owner:"Golmote"},pascal:{title:"Pascal",alias:"objectpascal",aliasTitles:{objectpascal:"Object Pascal"},owner:"Golmote"},pascaligo:{title:"Pascaligo",owner:"DefinitelyNotAGoat"},psl:{title:"PATROL Scripting Language",owner:"bertysentry"},pcaxis:{title:"PC-Axis",alias:"px",owner:"RunDevelopment"},peoplecode:{title:"PeopleCode",alias:"pcode",owner:"RunDevelopment"},perl:{title:"Perl",owner:"Golmote"},php:{title:"PHP",require:"markup-templating",owner:"milesj"},phpdoc:{title:"PHPDoc",require:["php","javadoclike"],modify:"php",owner:"RunDevelopment"},"php-extras":{title:"PHP Extras",require:"php",modify:"php",owner:"milesj"},"plant-uml":{title:"PlantUML",alias:"plantuml",owner:"RunDevelopment"},plsql:{title:"PL/SQL",require:"sql",owner:"Golmote"},powerquery:{title:"PowerQuery",alias:["pq","mscript"],owner:"peterbud"},powershell:{title:"PowerShell",owner:"nauzilus"},processing:{title:"Processing",require:"clike",owner:"Golmote"},prolog:{title:"Prolog",owner:"Golmote"},promql:{title:"PromQL",owner:"arendjr"},properties:{title:".properties",owner:"Golmote"},protobuf:{title:"Protocol Buffers",require:"clike",owner:"just-boris"},pug:{title:"Pug",require:["markup","javascript"],optional:["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],owner:"Golmote"},puppet:{title:"Puppet",owner:"Golmote"},pure:{title:"Pure",optional:["c","cpp","fortran"],owner:"Golmote"},purebasic:{title:"PureBasic",require:"clike",alias:"pbfasm",owner:"HeX0R101"},purescript:{title:"PureScript",require:"haskell",alias:"purs",owner:"sriharshachilakapati"},python:{title:"Python",alias:"py",owner:"multipetros"},qsharp:{title:"Q#",require:"clike",alias:"qs",owner:"fedonman"},q:{title:"Q (kdb+ database)",owner:"Golmote"},qml:{title:"QML",require:"javascript",owner:"RunDevelopment"},qore:{title:"Qore",require:"clike",owner:"temnroegg"},r:{title:"R",owner:"Golmote"},racket:{title:"Racket",require:"scheme",alias:"rkt",owner:"RunDevelopment"},cshtml:{title:"Razor C#",alias:"razor",require:["markup","csharp"],optional:["css","css-extras","javascript","js-extras"],owner:"RunDevelopment"},jsx:{title:"React JSX",require:["markup","javascript"],optional:["jsdoc","js-extras","js-templates"],owner:"vkbansal"},tsx:{title:"React TSX",require:["jsx","typescript"]},reason:{title:"Reason",require:"clike",owner:"Golmote"},regex:{title:"Regex",owner:"RunDevelopment"},rego:{title:"Rego",owner:"JordanSh"},renpy:{title:"Ren'py",alias:"rpy",owner:"HyuchiaDiego"},rescript:{title:"ReScript",alias:"res",owner:"vmarcosp"},rest:{title:"reST (reStructuredText)",owner:"Golmote"},rip:{title:"Rip",owner:"ravinggenius"},roboconf:{title:"Roboconf",owner:"Golmote"},robotframework:{title:"Robot Framework",alias:"robot",owner:"RunDevelopment"},ruby:{title:"Ruby",require:"clike",alias:"rb",owner:"samflores"},rust:{title:"Rust",owner:"Golmote"},sas:{title:"SAS",optional:["groovy","lua","sql"],owner:"Golmote"},sass:{title:"Sass (Sass)",require:"css",optional:"css-extras",owner:"Golmote"},scss:{title:"Sass (SCSS)",require:"css",optional:"css-extras",owner:"MoOx"},scala:{title:"Scala",require:"java",owner:"jozic"},scheme:{title:"Scheme",owner:"bacchus123"},"shell-session":{title:"Shell session",require:"bash",alias:["sh-session","shellsession"],owner:"RunDevelopment"},smali:{title:"Smali",owner:"RunDevelopment"},smalltalk:{title:"Smalltalk",owner:"Golmote"},smarty:{title:"Smarty",require:"markup-templating",optional:"php",owner:"Golmote"},sml:{title:"SML",alias:"smlnj",aliasTitles:{smlnj:"SML/NJ"},owner:"RunDevelopment"},solidity:{title:"Solidity (Ethereum)",alias:"sol",require:"clike",owner:"glachaud"},"solution-file":{title:"Solution file",alias:"sln",owner:"RunDevelopment"},soy:{title:"Soy (Closure Template)",require:"markup-templating",owner:"Golmote"},sparql:{title:"SPARQL",require:"turtle",owner:"Triply-Dev",alias:"rq"},"splunk-spl":{title:"Splunk SPL",owner:"RunDevelopment"},sqf:{title:"SQF: Status Quo Function (Arma 3)",require:"clike",owner:"RunDevelopment"},sql:{title:"SQL",owner:"multipetros"},squirrel:{title:"Squirrel",require:"clike",owner:"RunDevelopment"},stan:{title:"Stan",owner:"RunDevelopment"},stata:{title:"Stata Ado",require:["mata","java","python"],owner:"RunDevelopment"},iecst:{title:"Structured Text (IEC 61131-3)",owner:"serhioromano"},stylus:{title:"Stylus",owner:"vkbansal"},supercollider:{title:"SuperCollider",alias:"sclang",owner:"RunDevelopment"},swift:{title:"Swift",owner:"chrischares"},systemd:{title:"Systemd configuration file",owner:"RunDevelopment"},"t4-templating":{title:"T4 templating",owner:"RunDevelopment"},"t4-cs":{title:"T4 Text Templates (C#)",require:["t4-templating","csharp"],alias:"t4",owner:"RunDevelopment"},"t4-vb":{title:"T4 Text Templates (VB)",require:["t4-templating","vbnet"],owner:"RunDevelopment"},tap:{title:"TAP",owner:"isaacs",require:"yaml"},tcl:{title:"Tcl",owner:"PeterChaplin"},tt2:{title:"Template Toolkit 2",require:["clike","markup-templating"],owner:"gflohr"},textile:{title:"Textile",require:"markup",optional:"css",owner:"Golmote"},toml:{title:"TOML",owner:"RunDevelopment"},tremor:{title:"Tremor",alias:["trickle","troy"],owner:"darach",aliasTitles:{trickle:"trickle",troy:"troy"}},turtle:{title:"Turtle",alias:"trig",aliasTitles:{trig:"TriG"},owner:"jakubklimek"},twig:{title:"Twig",require:"markup-templating",owner:"brandonkelly"},typescript:{title:"TypeScript",require:"javascript",optional:"js-templates",alias:"ts",owner:"vkbansal"},typoscript:{title:"TypoScript",alias:"tsconfig",aliasTitles:{tsconfig:"TSConfig"},owner:"dkern"},unrealscript:{title:"UnrealScript",alias:["uscript","uc"],owner:"RunDevelopment"},uorazor:{title:"UO Razor Script",owner:"jaseowns"},uri:{title:"URI",alias:"url",aliasTitles:{url:"URL"},owner:"RunDevelopment"},v:{title:"V",require:"clike",owner:"taggon"},vala:{title:"Vala",require:"clike",optional:"regex",owner:"TemplarVolk"},vbnet:{title:"VB.Net",require:"basic",owner:"Bigsby"},velocity:{title:"Velocity",require:"markup",owner:"Golmote"},verilog:{title:"Verilog",owner:"a-rey"},vhdl:{title:"VHDL",owner:"a-rey"},vim:{title:"vim",owner:"westonganger"},"visual-basic":{title:"Visual Basic",alias:["vb","vba"],aliasTitles:{vba:"VBA"},owner:"Golmote"},warpscript:{title:"WarpScript",owner:"RunDevelopment"},wasm:{title:"WebAssembly",owner:"Golmote"},"web-idl":{title:"Web IDL",alias:"webidl",owner:"RunDevelopment"},wgsl:{title:"WGSL",owner:"Dr4gonthree"},wiki:{title:"Wiki markup",require:"markup",owner:"Golmote"},wolfram:{title:"Wolfram language",alias:["mathematica","nb","wl"],aliasTitles:{mathematica:"Mathematica",nb:"Mathematica Notebook"},owner:"msollami"},wren:{title:"Wren",owner:"clsource"},xeora:{title:"Xeora",require:"markup",alias:"xeoracube",aliasTitles:{xeoracube:"XeoraCube"},owner:"freakmaxi"},"xml-doc":{title:"XML doc (.net)",require:"markup",modify:["csharp","fsharp","vbnet"],owner:"RunDevelopment"},xojo:{title:"Xojo (REALbasic)",owner:"Golmote"},xquery:{title:"XQuery",require:"markup",owner:"Golmote"},yaml:{title:"YAML",alias:"yml",owner:"hason"},yang:{title:"YANG",owner:"RunDevelopment"},zig:{title:"Zig",owner:"RunDevelopment"}},plugins:{meta:{path:"plugins/{id}/prism-{id}",link:"plugins/{id}/"},"line-highlight":{title:"Line Highlight",description:"Highlights specific lines and/or line ranges."},"line-numbers":{title:"Line Numbers",description:"Line number at the beginning of code lines.",owner:"kuba-kubula"},"show-invisibles":{title:"Show Invisibles",description:"Show hidden characters such as tabs and line breaks.",optional:["autolinker","data-uri-highlight"]},autolinker:{title:"Autolinker",description:"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},wpd:{title:"WebPlatform Docs",description:'Makes tokens link to <a href="https://webplatform.github.io/docs/">WebPlatform.org documentation</a>. The links open in a new tab.'},"custom-class":{title:"Custom Class",description:"This plugin allows you to prefix Prism's default classes (<code>.comment</code> can become <code>.namespace--comment</code>) or replace them with your defined ones (like <code>.editor__comment</code>). You can even add new classes.",owner:"dvkndn",noCSS:!0},"file-highlight":{title:"File Highlight",description:"Fetch external files and highlight them with Prism. Used on the Prism website itself.",noCSS:!0},"show-language":{title:"Show Language",description:"Display the highlighted language in code blocks (inline code does not show the label).",owner:"nauzilus",noCSS:!0,require:"toolbar"},"jsonp-highlight":{title:"JSONP Highlight",description:"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).",noCSS:!0,owner:"nauzilus"},"highlight-keywords":{title:"Highlight Keywords",description:"Adds special CSS classes for each keyword for fine-grained highlighting.",owner:"vkbansal",noCSS:!0},"remove-initial-line-feed":{title:"Remove initial line feed",description:"Removes the initial line feed in code blocks.",owner:"Golmote",noCSS:!0},"inline-color":{title:"Inline color",description:"Adds a small inline preview for colors in style sheets.",require:"css-extras",owner:"RunDevelopment"},previewers:{title:"Previewers",description:"Previewers for angles, colors, gradients, easing and time.",require:"css-extras",owner:"Golmote"},autoloader:{title:"Autoloader",description:"Automatically loads the needed languages to highlight the code blocks.",owner:"Golmote",noCSS:!0},"keep-markup":{title:"Keep Markup",description:"Prevents custom markup from being dropped out during highlighting.",owner:"Golmote",optional:"normalize-whitespace",noCSS:!0},"command-line":{title:"Command Line",description:"Display a command line with a prompt and, optionally, the output/response from the commands.",owner:"chriswells0"},"unescaped-markup":{title:"Unescaped Markup",description:"Write markup without having to escape anything."},"normalize-whitespace":{title:"Normalize Whitespace",description:"Supports multiple operations to normalize whitespace in code blocks.",owner:"zeitgeist87",optional:"unescaped-markup",noCSS:!0},"data-uri-highlight":{title:"Data-URI Highlight",description:"Highlights data-URI contents.",owner:"Golmote",noCSS:!0},toolbar:{title:"Toolbar",description:"Attach a toolbar for plugins to easily register buttons on the top of a code block.",owner:"mAAdhaTTah"},"copy-to-clipboard":{title:"Copy to Clipboard Button",description:"Add a button that copies the code block to the clipboard when clicked.",owner:"mAAdhaTTah",require:"toolbar",noCSS:!0},"download-button":{title:"Download Button",description:"A button in the toolbar of a code block adding a convenient way to download a code file.",owner:"Golmote",require:"toolbar",noCSS:!0},"match-braces":{title:"Match braces",description:"Highlights matching braces.",owner:"RunDevelopment"},"diff-highlight":{title:"Diff Highlight",description:"Highlights the code inside diff blocks.",owner:"RunDevelopment",require:"diff"},"filter-highlight-all":{title:"Filter highlightAll",description:"Filters the elements the <code>highlightAll</code> and <code>highlightAllUnder</code> methods actually highlight.",owner:"RunDevelopment",noCSS:!0},treeview:{title:"Treeview",description:"A language with special styles to highlight file system tree structures.",owner:"Golmote"}}};t.exports&&(t.exports=e)})(U_)),U_.exports}var IG=LG();const EN=ts(IG),ic={bold:{labelKey:"bold",icon:"format_bold",inline:!0},italic:{labelKey:"italic",icon:"format_italic",inline:!0},strikethrough:{labelKey:"strikethrough",icon:"strikethrough_s",inline:!0},code:{labelKey:"code",icon:"code",inline:!0},link:{labelKey:"link",icon:"link",inline:!0},paragraph:{labelKey:"paragraph",icon:"format_paragraph",inline:!1},"heading-1":{labelKey:"heading_1",icon:"format_h1",inline:!1},"heading-2":{labelKey:"heading_2",icon:"format_h2",inline:!1},"heading-3":{labelKey:"heading_3",icon:"format_h3",inline:!1},"heading-4":{labelKey:"heading_4",icon:"format_h4",inline:!1},"heading-5":{labelKey:"heading_5",icon:"format_h5",inline:!1},"heading-6":{labelKey:"heading_6",icon:"format_h6",inline:!1},"bulleted-list":{labelKey:"bulleted_list",icon:"format_list_bulleted",inline:!1},"numbered-list":{labelKey:"numbered_list",icon:"format_list_numbered",inline:!1},blockquote:{labelKey:"blockquote",icon:"format_quote",inline:!1},"code-block":{labelKey:"code_block",icon:"code_blocks",inline:!1}},TN=["bold","italic","strikethrough","code"],$N=[...TN,"link"],l1=["paragraph","heading-1","heading-2","heading-3","heading-4","heading-5","heading-6","bulleted-list","numbered-list","blockquote","code-block"],c$=["image","linked-image"],AN=/^(?:\|)(.+)(?:\|)\s?$/,NG=/^(\| ?:?-*:? ?)+\|\s?$/;function RG(t){const e=t.getFirstChild();return fh(e)?e.getChildrenSize():0}const CN=t=>{t=t.replace(/\\n/g,`
|
|
405
405
|
`);const e=o1(ga.NO_STATUS);return xN(t,Xh,e),e},u$=t=>{const[,e]=t.match(AN)??[];return e?e.split("|").map(n=>CN(n)):null},MG={dependencies:[Ad,$d,Td],export:t=>{if(!j_(t))return null;const e=[];return t.getChildren().forEach(n=>{const r=[];if(!fh(n))return;let i=!1;n.getChildren().forEach(o=>{rc(o)&&(r.push(kN(Xh,o).replace(/\n/g,"\\n").trim()),o.__headerState===ga.ROW&&(i=!0))}),e.push(`| ${r.join(" | ")} |`),i&&e.push(`| ${r.map(()=>"---").join(" | ")} |`)}),e.join(`
|
|
406
406
|
`)},regExp:AN,replace:(t,e,[n])=>{if(NG.test(n)){const u=t.getPreviousSibling();if(!u||!j_(u))return;const d=u.getChildren(),f=d[d.length-1];if(!f||!fh(f))return;f.getChildren().forEach(h=>{rc(h)&&h.setHeaderStyles(ga.ROW,ga.ROW)}),t.remove();return}const r=u$(n);if(!r)return;const i=[r];let o=t.getPreviousSibling(),a=r.length;for(;o&&!(!Vh(o)||o.getChildrenSize()!==1);){const u=o.getFirstChild();if(!Ye(u))break;const d=u$(u.getTextContent());if(!d)break;a=Math.max(a,d.length),i.unshift(d);const f=o.getPreviousSibling();o.remove(),o=f}const s=s1();i.forEach(u=>{const d=a1();s.append(d);for(let f=0;f<a;f+=1)d.append(f<u.length?u[f]:CN(""))});const l=t.getPreviousSibling();j_(l)&&RG(l)===a?(l.append(...s.getChildren()),t.remove()):t.replace(s),s.selectEnd()},type:"element"},c1=[...Xh,MG],DG="https://unpkg.com/prismjs@1.30.0",d$={namespace:"editor",nodes:[gv,hv,nc,Ed,Jh,Ol,dh,Ad,Td,$d],theme:{text:{italic:"italic",strikethrough:"strikethrough"},list:{nested:{listitem:"nested"}},code:"code-block",codeHighlight:{atrule:"token atrule",attr:"token attr",boolean:"token boolean",builtin:"token builtin",cdata:"token cdata",char:"token char",class:"token class","class-name":"token class-name",comment:"token comment",constant:"token constant",deleted:"token deleted",doctype:"token doctype",entity:"token entity",function:"token function",important:"token important",inserted:"token inserted",keyword:"token keyword",namespace:"token namespace",number:"token number",operator:"token operator",prolog:"token prolog",property:"token property",punctuation:"token punctuation",regex:"token regex",selector:"token selector",string:"token string",symbol:"token symbol",tag:"token tag",url:"token url",variable:"token variable"}}},FG=()=>{const t=Ge();if(!De(t))return{blockNodeKey:null,blockType:"paragraph",inlineTypes:[]};const e=t.anchor.getNode();let n=null;const r=TN.filter(o=>t.hasFormat(o));e.getType()!=="root"&&(n=e instanceof ir?e:Pf(e,ir),Ma(n)&&(r.push("link"),n=Pf(n,ir)),Sn(n)&&(n=Pf(n,Ed)));const i=(()=>{if(!n)return"paragraph";if(pN(n))return`heading-${n.getTag().match(/\d/)?.[0]}`;if(Ot(n))return n.getListType()==="bullet"?"bulleted-list":"numbered-list";if(Jg(n))return"blockquote";if(bi(n)||Qn(n))return"code-block";const o=n.getType();return l1.includes(o)?o:"paragraph"})();return{blockNodeKey:n?.getKey()??null,blockType:i,inlineTypes:r}},zG=t=>{t.getRootElement()?.dispatchEvent(new CustomEvent("Update",{detail:{value:kN(c1.filter(({tag:e})=>e!=="*")).replace(/\\([_\\])/g,"$1").replace(/ /g," "),selection:FG()}}))},jG=({components:t=[],isCodeEditor:e=!1,defaultLanguage:n="plain"})=>{t.forEach(({node:i,transformer:o})=>{d$.nodes.unshift(i),c1.unshift(o)});const r=pI(d$);return W7(r),g7(r),eN(r,tN(),1e3),e7(r,{defaultLanguage:n,tokenize:(i,o="plain")=>window.Prism.tokenize(i,window.Prism.languages[o]??window.Prism.languages.plain),$tokenize:KI.$tokenize}),r.registerCommand(Qy,i=>(y7(typeof i=="string"?i:null),!0),cf),r.registerCommand(oN,()=>(FT("bullet"),!0),cf),r.registerCommand(aN,()=>(FT("number"),!0),cf),r.registerCommand(oh,()=>A7(),cf),r.registerUpdateListener(async()=>{r?.isComposing()||(await Rt(100),r.update(()=>{if(e){const i=ar(),o=i.getChildren();if(o.length===1&&!bi(o[0])&&o[0].remove(),o.length===0){const a=Io();a.setLanguage(n),i.append(a)}}zG(r)}))}),r.registerRootListener(i=>{i&&i.addEventListener("keydown",o=>{r.update(()=>{if(o.key==="Tab"){const a=Ge();if(!De(a))return;const s=a.anchor.getNode(),l=s instanceof ir?s:Pf(s,ir);Sn(l)&&l.canIndent()&&(o.shiftKey?l.getIndent()>0&&(o.preventDefault(),r.dispatchCommand(_l,void 0)):(o.preventDefault(),r.dispatchCommand(Os,void 0)))}})})}),r},PN=async t=>{if(t in window.Prism.languages)return;const e=Object.entries(EN.languages).find(([n,{alias:r}])=>n===t||(Array.isArray(r)?r.includes(t):r===t))?.[0];if(e)try{await DP(()=>import(`${DG}/components/prism-${e}.min.js`),[])}catch{}},UG=async(t,e)=>(await Promise.all([...e.matchAll(/^```(?<lang>.+?)\n/gm)].map(async({groups:{lang:n="plain"}={}})=>PN(n))),e=e.replace(/(\s+)_([^_\n]+?)\n([^_\n]+?)_(\s+)/gm,`$1_$2_
|
|
407
407
|
_$3_$4`).replace(/(\s+)\*\*([^*\n]+?)\n([^*\n]+?)\*\*(\s+)/gm,`$1**$2**
|
|
408
408
|
**$3**$4`).replace(/(\s+)~~([^~\n]+?)\n([^~\n]+?)~~(\s+)/gm,`$1~~$2~~
|
|
409
|
-
~~$3~~$4`).replace(/(\s+)`([^`\n]+?)\n([^`\n]+?)`(\s+)/gm,"$1`$2`\n`$3`$4"),e.match(/^\s{2}(?:-|\+|\*|\d+\.)\s/m)&&(e=e.replace(/^(\s+)(-|\+|\*|\d+\.)/gm,(n,r,i)=>`${" ".repeat(r.length*2)}${i}`)),new Promise((n,r)=>{t.update(()=>{try{xN(e,c1),n(void 0)}catch(i){r(new Error("Failed to convert Markdown",{cause:i}))}})})),mv=async t=>new Promise(e=>{t.focus(()=>{e(void 0)})});var BG=j("<div></div>");const qG={hash:"svelte-
|
|
410
|
-
@media (width < 768px) {[role=toolbar].secondary.svelte-
|
|
411
|
-
}[role=toolbar][aria-orientation=horizontal].svelte-
|
|
412
|
-
@media (width < 768px) {.wrapper.svelte-
|
|
413
|
-
}.wrapper.svelte-
|
|
409
|
+
~~$3~~$4`).replace(/(\s+)`([^`\n]+?)\n([^`\n]+?)`(\s+)/gm,"$1`$2`\n`$3`$4"),e.match(/^\s{2}(?:-|\+|\*|\d+\.)\s/m)&&(e=e.replace(/^(\s+)(-|\+|\*|\d+\.)/gm,(n,r,i)=>`${" ".repeat(r.length*2)}${i}`)),new Promise((n,r)=>{t.update(()=>{try{xN(e,c1),n(void 0)}catch(i){r(new Error("Failed to convert Markdown",{cause:i}))}})})),mv=async t=>new Promise(e=>{t.focus(()=>{e(void 0)})});var BG=j("<div></div>");const qG={hash:"svelte-r8wk5u",code:".lexical-root.svelte-r8wk5u {overflow:hidden;border:1px solid var(--sui-textbox-border-color);border-radius:var(--sui-textbox-border-radius) !important;padding:var(--sui-textbox-multiline-padding);min-height:8em;color:var(--sui-textbox-foreground-color);background-color:var(--sui-textbox-background-color);font-family:var(--sui-textbox-font-family);font-size:var(--sui-textbox-font-size);line-height:var(--sui-textbox-multiline-line-height);}.lexical-root.svelte-r8wk5u:not(:first-child) {border-start-start-radius:0 !important;border-start-end-radius:0 !important;}.lexical-root.code.svelte-r8wk5u {padding:0;}.lexical-root.code.svelte-r8wk5u .code-block {border-radius:0 !important;min-height:120px;}.lexical-root.svelte-r8wk5u:focus-visible {outline:0;}.lexical-root[aria-invalid=true].svelte-r8wk5u {border-color:var(--sui-error-border-color);}.lexical-root.svelte-r8wk5u :first-child {margin-top:0;}.lexical-root.svelte-r8wk5u :last-child {margin-bottom:0;}.lexical-root.svelte-r8wk5u strong.italic {font-style:italic;}.lexical-root.svelte-r8wk5u .strikethrough {text-decoration:line-through;}.lexical-root.svelte-r8wk5u li.nested {list-style-type:none;}.lexical-root.svelte-r8wk5u .code-block {position:relative;display:block;padding-block:8px;padding-inline-start:56px;padding-inline-end:8px;background-color:var(--sui-code-background-color);overflow-x:auto;white-space:pre;}.lexical-root.svelte-r8wk5u .code-block:not(:first-child) {margin-top:1em;}.lexical-root.svelte-r8wk5u .code-block:not(:last-child) {margin-bottom:1em;}.lexical-root.svelte-r8wk5u .code-block::before {position:absolute;inset-block:0;inset-inline-start:0;inset-inline-end:auto;content:attr(data-gutter);padding:8px;min-width:40px;color:var(--sui-tertiary-foreground-color);background-color:var(--sui-tertiary-background-color);text-align:end;}.lexical-root.svelte-r8wk5u [data-lexical-text=true] {cursor:text;}.lexical-root.svelte-r8wk5u :is(th, td) > p {margin:0;white-space:normal;word-break:normal;}:root[data-theme=light] .lexical-root.svelte-r8wk5u .token:is(.comment, .prolog, .doctype, .cdata) {color:slategray;}:root[data-theme=light] .lexical-root.svelte-r8wk5u .token.punctuation {color:#999;}:root[data-theme=light] .lexical-root.svelte-r8wk5u .token.namespace {opacity:0.7;}:root[data-theme=light] .lexical-root.svelte-r8wk5u .token:is(.property, .tag, .boolean, .number, .constant, .symbol, .deleted) {color:#905;}:root[data-theme=light] .lexical-root.svelte-r8wk5u .token:is(.selector, .attr-name, .string, .char, .builtin, .inserted) {color:#690;}:root[data-theme=light] .lexical-root.svelte-r8wk5u .token:is(.operator, .entity, .url), :root[data-theme=light] .lexical-root.svelte-r8wk5u .language-css .token.string, :root[data-theme=light] .lexical-root.svelte-r8wk5u .style .token.string {color:#9a6e3a;}:root[data-theme=light] .lexical-root.svelte-r8wk5u .token:is(.atrule, .attr-value, .keyword) {color:#07a;}:root[data-theme=light] .lexical-root.svelte-r8wk5u .token:is(.function, .class-name) {color:#dd4a68;}:root[data-theme=light] .lexical-root.svelte-r8wk5u .token:is(.regex, .important, .variable) {color:#e90;}:root[data-theme=dark] .lexical-root.svelte-r8wk5u .token:is(.comment, .block-comment, .prolog, .doctype, .cdata) {color:#999;}:root[data-theme=dark] .lexical-root.svelte-r8wk5u .token.punctuation {color:#ccc;}:root[data-theme=dark] .lexical-root.svelte-r8wk5u .token:is(.tag, .attr-name, .namespace, .deleted) {color:#e2777a;}:root[data-theme=dark] .lexical-root.svelte-r8wk5u .token.function-name {color:#6196cc;}:root[data-theme=dark] .lexical-root.svelte-r8wk5u .token:is(.boolean, .number, .function) {color:#f08d49;}:root[data-theme=dark] .lexical-root.svelte-r8wk5u .token:is(.property, .class-name, .constant, .symbol) {color:#f8c555;}:root[data-theme=dark] .lexical-root.svelte-r8wk5u .token:is(.selector, .important, .atrule, .keyword, .builtin) {color:#cc99cd;}:root[data-theme=dark] .lexical-root.svelte-r8wk5u .token:is(.string, .char, .attr-value, .regex, .variable) {color:#7ec699;}:root[data-theme=dark] .lexical-root.svelte-r8wk5u .token:is(.operator, .entity, .url) {color:#67cdcc;}:root[data-theme=dark] .lexical-root.svelte-r8wk5u .token:is(.important, .bold) {font-weight:bold;}:root[data-theme=dark] .lexical-root.svelte-r8wk5u .token.italic {font-style:italic;}:root[data-theme=dark] .lexical-root.svelte-r8wk5u .token.entity {cursor:help;}:root[data-theme=dark] .lexical-root.svelte-r8wk5u .token.inserted {color:green;}"};function ON(t,e){ae(e,!0),ke(t,qG);let n=N(e,"hidden",3,!1),r=N(e,"disabled",3,!1),i=N(e,"readonly",3,!1),o=N(e,"required",3,!1),a=N(e,"invalid",3,!1),s=ot(e,["$$slots","$$events","$$legacy","class","hidden","disabled","readonly","required","invalid","children"]);const l=pr("editorStore");let u=ie(void 0);const d=_(()=>!(r()||i()));ze(()=>{l.editor?.setEditable(c(d))});const f=g=>{const{hasConverterError:m,useRichText:v,inputValue:b}=l;if(m||!v)return;const{value:y,selection:w}=g.detail;b!==y&&(l.useRichText=!1,l.inputValue=y,l.useRichText=!0),l.selection=w},h=g=>{g.target?.matches("a")&&g.preventDefault()};Vt(()=>(l.editor=jG(l.config),c(u)?.addEventListener("Update",f),c(u)?.addEventListener("click",h),()=>{c(u)?.removeEventListener("Update",f),c(u)?.removeEventListener("click",h)})),ze(()=>{l.editor&&c(u)&&(l.editor.setRootElement(c(u)),l.initialized=!0)});var p=BG();mt(p,()=>({...s,role:"textbox","aria-multiline":"true","aria-hidden":n(),"aria-disabled":r(),"aria-readonly":i(),"aria-required":o(),"aria-invalid":a(),class:"lexical-root",id:`${l.editorId??""}-lexical-root`,contenteditable:c(d),hidden:n(),[Nr]:{code:l.config.isCodeEditor}}),void 0,void 0,void 0,"svelte-r8wk5u"),St(p,g=>V(u,g),()=>c(u)),S(t,p),se()}const LN=()=>{const t=b0("editor");let e=ie(!1),n=ie(void 0),r=ie(At({modes:[],enabledButtons:[],components:[],isCodeEditor:!1})),i=ie(""),o=ie(At({blockNodeKey:null,blockType:"paragraph",inlineTypes:[]})),a=ie(!0),s=ie(!1),l=ie(!1);const u=async()=>{if(!c(n)||!c(e))return;const d=c(i);try{await UG(c(n),c(i)||"")}catch(f){V(s,!0),V(i,d,!0),console.error(f)}};return{get editor(){return c(n)},set editor(d){V(n,d,!0)},get initialized(){return c(e)},set initialized(d){V(e,d,!0)},get config(){return c(r)},set config(d){V(r,d,!0),V(a,d.modes[0]==="rich-text"||d.isCodeEditor,!0)},get inputValue(){return c(i)},set inputValue(d){const f=c(i)!==d;f&&V(i,d,!0),c(a)&&(f||c(n)?.getEditorState().isEmpty())&&u()},get selection(){return c(o)},set selection(d){V(o,d,!0)},get useRichText(){return c(a)},set useRichText(d){V(a,d,!0)},get hasConverterError(){return c(s)},set hasConverterError(d){V(s,d,!0),c(s)&&(V(a,!1),V(l,!0))},get showConverterError(){return c(l)},set showConverterError(d){V(l,d,!0)},editorId:t,convertMarkdown:u}};var HG=j("<!> <!>",1);function IN(t,e){ae(e,!0);const n=()=>H(ce,"$_",r),[r,i]=ve();let o=N(e,"disabled",3,!1);const a=Object.entries(EN.languages).filter(([,u])=>"title"in u).map(([u,d])=>{const{title:f,aliasTitles:h,alias:p}=d;let g=[];return p&&!h&&(g=Array.isArray(p)?p:[p]),[{key:u,label:f,aliases:g},...Object.entries(h??{}).map(([m,v])=>({key:m,label:v,aliases:[]}))]}).flat(1).sort((u,d)=>u.label.localeCompare(d.label)),s=pr("editorStore");let l=ie("plain");ze(()=>{s.selection.blockNodeKey,s.editor?.read(()=>{const u=s.config.isCodeEditor?ar().getChildren()[0]:qn(s.selection.blockNodeKey);bi(u)&&V(l,u.getLanguage()??s.config.defaultLanguage??"plain",!0)})});{let u=_(()=>n()("_sui.text_editor.language"));bc(t,{get disabled(){return o()},get"aria-label"(){return c(u)},get value(){return c(l)},onChange:async({detail:{value:d}})=>{!s.editor||c(l)===d||(await mv(s.editor),s.selection?.blockNodeKey&&(await PN(d),s.editor.update(()=>{const f=qn(s.selection.blockNodeKey);bi(f)&&(f.setLanguage(d),V(l,d,!0))})))},children:(d,f)=>{var h=HG(),p=M(h);{let m=_(()=>n()("_sui.text_editor.plain_text"));Mr(p,{get label(){return c(m)},value:"plain",dir:"ltr"})}var g=z(p,2);rt(g,17,()=>a,({key:m,label:v,aliases:b})=>m,(m,v)=>{let b=()=>c(v).key,y=()=>c(v).label,w=()=>c(v).aliases;{let x=_(()=>b()===c(l)||w().includes(c(l)));Mr(m,{get label(){return y()},get value(){return b()},get selected(){return c(x)},dir:"ltr"})}}),S(d,h)},$$slots:{default:!0}})}se(),i()}var KG=j('<div><div role="none" class="inner svelte-1kqo5sg"><!></div></div>');const VG={hash:"svelte-1kqo5sg",code:`[role=toolbar].svelte-1kqo5sg {--toolbar-size: var(--sui-secondary-toolbar-size);flex:none !important;display:flex;align-items:center;padding-inline:8px;background-color:var(--toolbar-background-color, transparent);}[role=toolbar].primary.svelte-1kqo5sg {--toolbar-size: var(--sui-primary-toolbar-size);}
|
|
410
|
+
@media (width < 768px) {[role=toolbar].secondary.svelte-1kqo5sg {padding-inline:0;}
|
|
411
|
+
}[role=toolbar][aria-orientation=horizontal].svelte-1kqo5sg {height:var(--toolbar-size);}[role=toolbar][aria-orientation=vertical].svelte-1kqo5sg {flex-direction:column;width:var(--toolbar-size);}[role=toolbar].svelte-1kqo5sg button[role=button]:is([aria-pressed=true], [aria-checked=true]) {background-color:var(--sui-selected-background-color);}[role=toolbar].svelte-1kqo5sg h2 {flex:auto;display:flex;align-items:center;gap:8px;margin:0;padding-inline-end:12px;min-width:0;font-size:var(--sui-font-size-x-large);}[role=toolbar].svelte-1kqo5sg h2:first-child {padding-inline-start:12px;}[role=toolbar].svelte-1kqo5sg h2 span:not(.sui.truncated-text) {font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-normal, normal);opacity:0.8;}[role=toolbar].svelte-1kqo5sg .divider[aria-orientation=horizontal] {margin:0 4px;width:calc(100% - 8px);}[role=toolbar].svelte-1kqo5sg .divider[aria-orientation=vertical] {margin:4px 0;height:calc(100% - 8px);}.inner.svelte-1kqo5sg {display:contents;}`};function io(t,e){ke(t,VG);let n=N(e,"hidden",3,!1),r=N(e,"disabled",3,!1),i=N(e,"orientation",3,"horizontal"),o=N(e,"variant",3,void 0),a=ot(e,["$$slots","$$events","$$legacy","class","hidden","disabled","orientation","variant","children"]);var s=KG();mt(s,()=>({...a,role:"toolbar",class:`sui toolbar ${i()??""} ${o()??""} ${e.class??""}`,hidden:n(),"aria-hidden":n(),"aria-disabled":r(),"aria-orientation":i()}),void 0,void 0,void 0,"svelte-1kqo5sg");var l=F(s),u=F(l);Ue(u,()=>e.children??He),Z(()=>l.inert=r()),S(t,s)}var GG=j('<div role="none" class="wrapper svelte-9j1uwy"><!></div>');const WG={hash:"svelte-9j1uwy",code:`.wrapper.svelte-9j1uwy {display:contents;}.wrapper.svelte-9j1uwy [role=toolbar] {position:sticky;top:0;z-index:100;display:flex;gap:4px;border-width:1px 1px 0;border-style:solid;border-color:var(--sui-textbox-border-color);border-start-start-radius:var(--sui-textbox-border-radius);border-start-end-radius:var(--sui-textbox-border-radius);border-end-start-radius:0;border-end-end-radius:0;padding:0 4px;height:40px;background-color:var(--sui-tertiary-background-color);}
|
|
412
|
+
@media (width < 768px) {.wrapper.svelte-9j1uwy [role=toolbar] {flex-wrap:wrap;height:auto;}
|
|
413
|
+
}.wrapper.svelte-9j1uwy .sui.menu-button {padding:0 4px;}.wrapper.svelte-9j1uwy .sui.button {flex:none;margin:0 !important;}.wrapper.svelte-9j1uwy .sui.button-group {gap:4px;}`};function NN(t,e){ae(e,!0),ke(t,WG),N(e,"code",11,""),N(e,"lang",11,"plain");let n=N(e,"disabled",3,!1),r=ot(e,["$$slots","$$events","$$legacy","code","lang","disabled","children"]);var i=GG(),o=F(i);io(o,Qt(()=>r,{get disabled(){return n()},children:(a,s)=>{var l=X(),u=M(l);Ue(u,()=>e.children??He),S(a,l)},$$slots:{default:!0}})),S(t,i),se()}function YG(t,e){ae(e,!0);const n=()=>H(ce,"$_",r),[r,i]=ve();let o=N(e,"disabled",3,!1),a=N(e,"readonly",3,!1);{let s=_(()=>o()||a()),l=_(()=>n()("_sui.text_editor.code_editor"));NN(t,{get disabled(){return c(s)},get"aria-label"(){return c(l)},children:(u,d)=>{{let f=_(()=>o()||a());IN(u,{get disabled(){return c(f)}})}},$$slots:{default:!0}})}se(),i()}var JG=j("<div><!> <!></div> <!>",1);const XG={hash:"svelte-r5gpai",code:".code-editor.svelte-r5gpai {margin:var(--sui-focus-ring-width);width:calc(100% - var(--sui-focus-ring-width) * 2);}"};function ZG(t,e){ae(e,!0),ke(t,XG);const n=()=>H(ce,"$_",r),[r,i]=ve();let o=N(e,"code",15,""),a=N(e,"lang",15,"plain"),s=N(e,"showLanguageSwitcher",3,!1),l=N(e,"flex",3,!1),u=N(e,"hidden",3,!1),d=N(e,"disabled",3,!1),f=N(e,"readonly",3,!1),h=N(e,"required",3,!1),p=N(e,"invalid",3,!1),g=ot(e,["$$slots","$$events","$$legacy","code","lang","showLanguageSwitcher","flex","hidden","disabled","readonly","required","invalid","children"]);const m="```",v=LN();v.config={...v.config,isCodeEditor:!0,defaultLanguage:a()},_w("editorStore",v),ze(()=>{v.initialized&&(o(),a(),xe(()=>{const k=o()?`${m}${a()}
|
|
414
414
|
${o()}
|
|
415
415
|
${m}`:`${m}${a()}
|
|
416
|
-
${m}`;v.inputValue=k}))}),ze(()=>{v.initialized&&(v.inputValue,xe(()=>{const{lang:k="plain",code:T=""}=v.inputValue.match(/^```(?<lang>\w+?)?\n(?:(?<code>.*)\n)?```/s)?.groups??{};a()!==k&&a(k),o()!==T&&o(T)}))});var b=JG(),y=M(b);mt(y,()=>({...g,role:"none",class:"sui code-editor",hidden:u(),[Nr]:{flex:l()}}),void 0,void 0,void 0,"svelte-6vu97h");var w=F(y);{var x=k=>{YG(k,{get disabled(){return d()},get readonly(){return f()}})};U(w,k=>{s()&&k(x)})}var E=z(w,2);ON(E,{get hidden(){return u()},get disabled(){return d()},get readonly(){return f()},get required(){return h()},get invalid(){return p()}});var $=z(y,2);{var A=k=>{nr(k,{get show(){return v.showConverterError},set show(T){v.showConverterError=T},children:(T,C)=>{Hn(T,{status:"error",children:(P,O)=>{var I=Fe();Z(L=>ne(I,L),[()=>n()("_sui.text_editor.converter_error")]),S(P,I)},$$slots:{default:!0}})},$$slots:{default:!0}})};U($,k=>{v.showConverterError&&k(A)})}S(t,b),se(),i()}var QG=j('<div class="clone svelte-qvuq6u" aria-hidden="true"> </div>'),eW=j('<div role="none"><textarea></textarea> <!></div>');const tW={hash:"svelte-qvuq6u",code:".text-area.svelte-qvuq6u {display:inline-grid;margin:var(--sui-focus-ring-width);min-width:var(--sui-textbox-multiline-min-width);}.text-area[hidden].svelte-qvuq6u {display:none;}.text-area.flex.svelte-qvuq6u {width:-moz-available;width:-webkit-fill-available;width:stretch;min-width:0;}:is(textarea.svelte-qvuq6u, .clone.svelte-qvuq6u) {grid-area:1/1/2/2;display:block;margin:0;border-width:var(--sui-textbox-border-width, 1px);border-color:var(--sui-textbox-border-color);border-radius:var(--sui-textbox-border-radius);padding:var(--sui-textbox-multiline-padding);width:100%;min-height:8em;color:var(--sui-textbox-foreground-color);background-color:var(--sui-textbox-background-color);font-family:var(--sui-textbox-font-family);font-size:var(--sui-textbox-font-size);line-height:var(--sui-textbox-multiline-line-height);font-weight:var(--sui-textbox-font-weight, var(--sui-font-weight-normal, normal));text-align:var(--sui-textbox-text-align, start);text-indent:var(--sui-textbox-text-indent, 0);text-transform:var(--sui-textbox-text-transform, none);letter-spacing:var(--sui-textbox-letter-spacing, normal);word-spacing:var(--sui-word-spacing-normal, normal);transition:all 200ms;}:is(textarea:where(.svelte-qvuq6u), .clone:where(.svelte-qvuq6u)).resizing.svelte-qvuq6u {transition-duration:0ms;}.svelte-qvuq6u:is(textarea:where(.svelte-qvuq6u), .clone:where(.svelte-qvuq6u)):focus {border-color:var(--sui-textbox-border-color-focus, var(--sui-primary-accent-color));color:var(--sui-textbox-foreground-color-focus, var(--sui-textbox-foreground-color));background-color:var(--sui-textbox-background-color-focus, var(--sui-textbox-background-color));}.svelte-qvuq6u:is(textarea:where(.svelte-qvuq6u), .clone:where(.svelte-qvuq6u)):is(:where(.svelte-qvuq6u):disabled, :where(.svelte-qvuq6u):read-only) {background-color:var(--sui-disabled-background-color);}textarea.svelte-qvuq6u {resize:vertical;}textarea.auto-resize.svelte-qvuq6u {overflow:hidden;resize:none;}textarea[aria-invalid=true].svelte-qvuq6u {border-color:var(--sui-error-border-color);}.clone.svelte-qvuq6u {overflow:hidden;visibility:hidden;white-space:pre-wrap;}"};function Zh(t,e){ae(e,!0),ke(t,tW);let n=N(e,"value",15,""),r=N(e,"flex",3,!1),i=N(e,"name",3,void 0),o=N(e,"autoResize",3,!1),a=N(e,"hidden",3,!1),s=N(e,"disabled",3,!1),l=N(e,"readonly",3,!1),u=N(e,"required",3,!1),d=N(e,"invalid",3,!1),f=ot(e,["$$slots","$$events","$$legacy","value","flex","name","autoResize","class","hidden","disabled","readonly","required","invalid","children"]);var h=eW();let p;var g=F(h);mt(g,()=>({...f,name:i(),dir:"auto",disabled:s()||void 0,readonly:l()||void 0,"aria-hidden":a(),"aria-disabled":s(),"aria-readonly":l(),"aria-required":u(),"aria-invalid":d(),[Nr]:{"auto-resize":o()}}),void 0,void 0,void 0,"svelte-qvuq6u");var m=z(g,2);{var v=b=>{var y=QG(),w=F(y);Z(()=>ne(w,n())),S(b,y)};U(m,b=>{o()&&b(v)})}Z(()=>{p=hn(h,1,`sui text-area ${e.class??""}`,"svelte-qvuq6u",p,{flex:r(),disabled:s(),readonly:l()}),Se(h,"hidden",a()),g.dir=g.dir}),pm(g,n),S(t,h),se()}function nW(t,e){ae(e,!0);const n=()=>H(ce,"$_",r),[r,i]=ve(),o=pr("editorStore"),a=_(()=>o.selection.inlineTypes.includes(e.type));{const s=d=>{Qe(d,{get name(){return ic[e.type].icon}})};let l=_(()=>n()(`_sui.text_editor.${ic[e.type].labelKey}`)),u=_(()=>!o.useRichText);et(t,{iconic:!0,get"aria-label"(){return c(l)},get"aria-controls"(){return`${o.editorId??""}-lexical-root`},get disabled(){return c(u)},get pressed(){return c(a)},onclick:async()=>{o.editor&&(await mv(o.editor),o.editor.dispatchCommand(Ua,e.type))},startIcon:s,$$slots:{startIcon:!0}})}se(),i()}function rW(t,e){ae(e,!0);const n=pr("editorStore");{const r=o=>{Qe(o,{get name(){return e.component.icon}})};let i=_(()=>!n.useRichText);et(t,{iconic:!0,get"aria-label"(){return e.component.label},get"aria-controls"(){return`${n.editorId??""}-lexical-root`},get disabled(){return c(i)},onclick:()=>{n.editor?.update(()=>{yd([e.component.createNode(),Tn()])})},startIcon:r,$$slots:{startIcon:!0}})}se()}var iW=j('<div role="none"><label> </label> <!></div>'),oW=j('<div role="none"><label> </label> <!></div> <!>',1),aW=j("<!> <!>",1);function sW(t,e){const n=Jn();ae(e,!0);const r=()=>H(ce,"$_",i),[i,o]=ve(),a="link",s=pr("editorStore"),l=_(()=>s.selection.inlineTypes.includes(a));let u=ie(!1),d=ie("create"),f=ie(!1),h=ie(""),p=ie("");const g=()=>{s.editor?.getEditorState().read(()=>{const k=GK().trim();V(h,k,!0),V(f,!!k),V(d,"create"),V(u,!0)})},m=()=>{s.editor?.dispatchCommand(Qy,null)},v=()=>{s.editor?.getEditorState().read(()=>{const k=Ge();if(De(k)){const T=k.anchor.getNode(),P=(T instanceof nc?T:Pf(T,nc))?.getURL();if(P){V(f,!0),V(h,P,!0),V(d,"update"),V(u,!0);return}}m()})},b=()=>{c(l)?v():g()},y=k=>{yy(k,"Enter")&&c(h)&&V(u,!1)},w=async k=>{if(k.detail.returnValue!=="cancel"&&c(d)!=="remove"){if(!s.editor)return;await new Promise(T=>{s.editor?.update(async()=>{let C=Ge()??wc()?.clone();if(De(C)||(C=iv()),!c(f)){V(p,c(p).trim(),!0),V(p,c(p)||c(h),!0);const{anchor:P,focus:O}=C,I=zn(c(p)),L=I.getKey();yd([I]),P.set(L,c(p).length,"text"),O.set(L,0,"text")}Br(C),T(void 0)})}),await mv(s.editor),s.editor.dispatchCommand(Qy,c(h))}V(h,""),V(p,"")},x=()=>{s.editor?.registerCommand(ML,k=>(yy(k,lL()?"Meta+K":"Ctrl+K")&&(k.preventDefault(),b()),!1),cf)};ze(()=>{s.editor&&x()});var E=aW(),$=M(E);{const k=P=>{Qe(P,{get name(){return ic[a].icon}})};let T=_(()=>r()(`_sui.text_editor.${ic[a].labelKey}`)),C=_(()=>!s.useRichText);et($,{iconic:!0,get"aria-label"(){return c(T)},get"aria-controls"(){return`${s.editorId??""}-lexical-root`},get disabled(){return c(C)},get pressed(){return c(l)},onclick:()=>{b()},startIcon:k,$$slots:{startIcon:!0}})}var A=z($,2);{const k=O=>{var I=X(),L=M(I);{var D=B=>{{let K=_(()=>r()("_sui.remove"));et(B,{variant:"secondary",get label(){return c(K)},onclick:()=>{m(),V(d,"remove"),V(u,!1)}})}};U(L,B=>{c(d)!=="create"&&B(D)})}S(O,I)};let T=_(()=>c(d)==="create"?r()("_sui.text_editor.insert_link"):r()("_sui.text_editor.update_link")),C=_(()=>!c(h)),P=_(()=>c(d)==="create"?r()("_sui.insert"):r()("_sui.update"));xo(A,{get title(){return c(T)},get okDisabled(){return c(C)},get okLabel(){return c(P)},onClose:O=>{w(O)},get open(){return c(u)},set open(O){V(u,O,!0)},get value(){return c(h)},set value(O){V(h,O,!0)},footerExtra:k,children:(O,I)=>{var L=oW(),D=M(L),B=F(D),K=F(B),G=z(B,2);Yn(G,{get id(){return`${n}-url`},flex:!0,"aria-label":"URL",onkeydown:R=>{y(R)},get value(){return c(h)},set value(R){V(h,R,!0)}});var W=z(D,2);{var Y=R=>{var q=iW(),J=F(q),Q=F(J),ee=z(J,2);Yn(ee,{get id(){return`${n}-text`},flex:!0,onkeydown:re=>{y(re)},get value(){return c(p)},set value(re){V(p,re,!0)}}),Z(re=>{Se(J,"for",`${n}-text`),ne(Q,re)},[()=>r()("_sui.text_editor.text")]),S(R,q)};U(W,R=>{c(f)||R(Y)})}Z(R=>{Se(B,"for",`${n}-url`),ne(K,R)},[()=>r()("_sui.text_editor.url")]),S(O,L)},$$slots:{footerExtra:!0,default:!0}})}S(t,E),se(),o()}function lW(t,e){ae(e,!0);const n=()=>H(ce,"$_",r),[r,i]=ve(),o=pr("editorStore");{const a=d=>{Qe(d,{name:"arrow_drop_down",class:"small-arrow"})},s=d=>{xr(d,{children:(f,h)=>{var p=X(),g=M(p);rt(g,17,()=>e.components,({id:m,label:v,icon:b,createNode:y})=>m,(m,v)=>{let b=()=>c(v).label,y=()=>c(v).icon,w=()=>c(v).createNode;vt(m,{get label(){return b()},onclick:()=>{o.editor?.update(()=>{yd([w()()])})},startIcon:E=>{var $=X(),A=M($);{var k=T=>{Qe(T,{get name(){return y()}})};U(A,T=>{y()&&T(k)})}S(E,$)},$$slots:{startIcon:!0}})}),S(f,p)},$$slots:{default:!0}})};let l=_(()=>!o.useRichText),u=_(()=>n()("_sui.insert"));ei(t,{get disabled(){return c(l)},get label(){return c(u)},endIcon:a,popup:s,$$slots:{endIcon:!0,popup:!0}})}se(),i()}function cW(t,e){ae(e,!0);const n=()=>H(ce,"$_",r),[r,i]=ve(),o=pr("editorStore"),a=_(()=>o.selection.blockType===e.type),s=async()=>{if(!o.editor)return;await mv(o.editor);const[,d]=e.type.match(/^heading-(\d)$/)??[];d&&o.editor.update(()=>{Lp(Ge(),()=>wl(`h${d}`))}),e.type==="paragraph"&&o.editor.update(()=>{Lp(Ge(),()=>Tn())}),e.type==="bulleted-list"&&o.editor.dispatchCommand(oN,void 0),e.type==="numbered-list"&&o.editor.dispatchCommand(aN,void 0),e.type==="blockquote"&&o.editor.update(()=>{Lp(Ge(),()=>pv())}),e.type==="code-block"&&o.editor.update(()=>{Lp(Ge(),()=>Io())})};var l=X(),u=M(l);fr(u,()=>c(a),d=>{{const f=p=>{Qe(p,{get name(){return ic[e.type].icon}})};let h=_(()=>n()(`_sui.text_editor.${ic[e.type].labelKey}`));Lg(d,{get label(){return c(h)},get checked(){return c(a)},onclick:()=>{c(a)||s()},startIcon:f,$$slots:{startIcon:!0}})}}),S(t,l),se(),i()}var uW=j("<!> <!>",1),dW=j("<!> <!>",1),fW=j("<!> <!> <!>",1),hW=j("<!> <!>",1),pW=j("<!> <!> <!> <!>",1);function gW(t,e){ae(e,!0);const n=()=>H(ce,"$_",r),[r,i]=ve();let o=N(e,"disabled",3,!1),a=N(e,"readonly",3,!1);const s=pr("editorStore"),l=_(()=>s.config.components.find(({id:h})=>c$.includes(h))),u=_(()=>s.config.components.filter(({id:h})=>!c$.includes(h))),d=_(()=>$u(["paragraph",...s.config.enabledButtons.filter(h=>l1.includes(h))])),f=_(()=>$u(s.config.enabledButtons.filter(h=>$N.includes(h))));{let h=_(()=>o()||a()),p=_(()=>n()("_sui.text_editor.text_editor"));NN(t,{get disabled(){return c(h)},get"aria-label"(){return c(p)},children:(g,m)=>{var v=pW(),b=M(v);{const k=O=>{{let I=_(()=>ic[s.selection.blockType??""]?.icon??"format_paragraph");Qe(O,{get name(){return c(I)}})}},T=O=>{{let I=_(()=>n()("_sui.text_editor.text_style_options"));xr(O,{get"aria-label"(){return c(I)},children:(L,D)=>{var B=X(),K=M(B);rt(K,16,()=>c(d),G=>G,(G,W)=>{cW(G,{get type(){return W}})}),S(L,B)},$$slots:{default:!0}})}};let C=_(()=>!s.useRichText),P=_(()=>n()("_sui.text_editor.show_text_style_options"));ei(b,{get disabled(){return c(C)},get"aria-label"(){return c(P)},get"aria-controls"(){return`${s.editorId??""}-lexical-root`},startIcon:k,popup:T,$$slots:{startIcon:!0,popup:!0}})}var y=z(b,2);{var w=k=>{var T=uW(),C=M(T);vi(C,{orientation:"vertical"});var P=z(C,2);{let O=_(()=>!s.useRichText);IN(P,{get disabled(){return c(O)}})}S(k,T)},x=k=>{var T=hW(),C=M(T);{var P=L=>{var D=dW(),B=M(D);vi(B,{orientation:"vertical"});var K=z(B,2);X6(K,{children:(G,W)=>{var Y=X(),R=M(Y);rt(R,16,()=>c(f),q=>q,(q,J)=>{var Q=X(),ee=M(Q);{var re=de=>{sW(de,{})},te=de=>{nW(de,{get type(){return J}})};U(ee,de=>{J==="link"?de(re):de(te,!1)})}S(q,Q)}),S(G,Y)},$$slots:{default:!0}}),S(L,D)};U(C,L=>{c(f).length&&L(P)})}var O=z(C,2);{var I=L=>{var D=fW(),B=M(D);vi(B,{orientation:"vertical"});var K=z(B,2);{var G=R=>{rW(R,{get component(){return c(l)}})};U(K,R=>{c(l)&&R(G)})}var W=z(K,2);{var Y=R=>{lW(R,{get components(){return c(u)}})};U(W,R=>{c(u).length&&R(Y)})}S(L,D)};U(O,L=>{s.config.components.length&&L(I)})}S(k,T)};U(y,k=>{s.selection.blockType==="code-block"?k(w):k(x,!1)})}var E=z(y,2);_i(E,{flex:!0});var $=z(E,2);{var A=k=>{{const T=O=>{Qe(O,{name:"markdown"})};let C=_(()=>!s.useRichText),P=_(()=>n()("_sui.text_editor.edit_in_markdown"));et(k,{iconic:!0,get disabled(){return s.hasConverterError},get pressed(){return c(C)},get"aria-label"(){return c(P)},onclick:()=>{s.useRichText=!s.useRichText,s.useRichText&&s.convertMarkdown()},startIcon:T,$$slots:{startIcon:!0}})}};U($,k=>{s.config.modes.length>1&&k(A)})}S(g,v)},$$slots:{default:!0}})}se(),i()}var mW=j("<div><!> <!> <!></div> <!>",1);const vW={hash:"svelte-ytf8r3",code:".text-editor.svelte-ytf8r3 {margin:var(--sui-focus-ring-width);width:calc(100% - var(--sui-focus-ring-width) * 2);}.text-editor.svelte-ytf8r3 .sui.text-area {margin:0 !important;width:100% !important;min-width:auto;}.text-editor.svelte-ytf8r3 .sui.text-area textarea {border-start-start-radius:0 !important;border-start-end-radius:0 !important;border-end-start-radius:var(--sui-textbox-border-radius) !important;border-end-end-radius:var(--sui-textbox-border-radius) !important;}"};function _W(t,e){ae(e,!0),ke(t,vW);const n=()=>H(ce,"$_",r),[r,i]=ve();let o=N(e,"value",15,""),a=N(e,"flex",3,!1),s=N(e,"modes",19,()=>["rich-text","plain-text"]),l=N(e,"buttons",19,()=>[...$N,...l1]),u=N(e,"components",19,()=>[]),d=N(e,"hidden",3,!1),f=N(e,"disabled",3,!1),h=N(e,"readonly",3,!1),p=N(e,"required",3,!1),g=N(e,"invalid",3,!1),m=ot(e,["$$slots","$$events","$$legacy","value","flex","modes","buttons","components","hidden","disabled","readonly","required","invalid","children"]);const v=LN();v.config={...v.config,modes:s(),enabledButtons:l(),components:u()},_w("editorStore",v),ze(()=>{if(!v.initialized)return;const k=o();xe(()=>{v.inputValue=k})}),ze(()=>{if(!v.initialized)return;const k=v.inputValue;xe(()=>{o()!==k&&o(k)})});var b=mW(),y=M(b);mt(y,()=>({...m,role:"none",class:"sui text-editor",hidden:d(),[Nr]:{flex:a()}}),void 0,void 0,void 0,"svelte-ytf8r3");var w=F(y);gW(w,{get disabled(){return f()},get readonly(){return h()}});var x=z(w,2);{let k=_(()=>!v.useRichText||d());ON(x,{get hidden(){return c(k)},get disabled(){return f()},get readonly(){return h()},get required(){return p()},get invalid(){return g()}})}var E=z(x,2);{let k=_(()=>v.useRichText||d());Zh(E,{autoResize:!0,get flex(){return a()},get hidden(){return c(k)},get disabled(){return f()},get readonly(){return h()},get required(){return p()},get invalid(){return g()},get value(){return v.inputValue},set value(T){v.inputValue=T}})}var $=z(y,2);{var A=k=>{nr(k,{get show(){return v.showConverterError},set show(T){v.showConverterError=T},children:(T,C)=>{Hn(T,{status:"error",children:(P,O)=>{var I=Fe();Z(L=>ne(I,L),[()=>n()("_sui.text_editor.converter_error")]),S(P,I)},$$slots:{default:!0}})},$$slots:{default:!0}})};U($,k=>{v.showConverterError&&k(A)})}S(t,b),se(),i()}var bW=j('<div role="none"><div role="none" class="buttons svelte-1o8zacf"><!> <!></div> <!></div>');const yW={hash:"svelte-1o8zacf",code:".number-input.svelte-1o8zacf {display:inline-flex;align-items:center;margin:var(--sui-focus-ring-width);min-width:var(--sui-textbox-singleline-min-width);}.number-input.flex.svelte-1o8zacf {width:-moz-available;width:-webkit-fill-available;width:stretch;min-width:0;}.number-input.svelte-1o8zacf :not(:first-child) input {border-start-start-radius:0;border-end-start-radius:0;}.number-input.svelte-1o8zacf :not(:last-child) input {border-start-end-radius:0;border-end-end-radius:0;}.number-input.svelte-1o8zacf :not(.disabled) button[aria-disabled=true] {filter:grayscale(0) opacity(1);}.number-input.svelte-1o8zacf :not(.disabled) button[aria-disabled=true] * {filter:grayscale(1) opacity(0.35);}.number-input.svelte-1o8zacf .text-input {flex:auto;margin:0 !important;width:0;min-width:0 !important;}.buttons.svelte-1o8zacf {display:flex;flex-direction:column;width:24px;height:var(--sui-textbox-height);}.buttons.svelte-1o8zacf button {flex:none;margin:0 !important;border-width:1px;border-color:var(--sui-textbox-border-color);width:100%;height:50%;}.buttons.svelte-1o8zacf button:first-of-type {border-block-start-width:1px;border-block-end-width:0;border-inline-end-width:0;border-inline-start-width:1px;border-start-end-radius:0;border-end-end-radius:0;border-end-start-radius:0;}.buttons.svelte-1o8zacf button:last-of-type {border-block-start-width:0;border-block-end-width:1px;border-inline-end-width:0;border-inline-start-width:1px;border-start-start-radius:0;border-start-end-radius:0;border-end-end-radius:0;}.buttons.svelte-1o8zacf button .icon {font-size:20px;}"};function wW(t,e){const n=Jn();ae(e,!0),ke(t,yW);const r=()=>H(ce,"$_",i),[i,o]=ve();let a=N(e,"value",15),s=N(e,"invalid",15,!1),l=N(e,"flex",3,!1),u=N(e,"min",3,void 0),d=N(e,"max",3,void 0),f=N(e,"step",3,1),h=N(e,"hidden",3,!1),p=N(e,"disabled",3,!1),g=N(e,"readonly",3,!1),m=N(e,"required",3,!1),v=ot(e,["$$slots","$$events","$$legacy","value","invalid","flex","min","max","step","class","hidden","disabled","readonly","required","children","increaseIcon","decreaseIcon","onChange"]),b=ie(!1),y=ie("");const w=_(()=>String(f()).split(".")[1]?.length||0),x=_(()=>typeof u()=="number"&&Number(c(y)||0)<=u()),E=_(()=>typeof d()=="number"&&Number(c(y)||0)>=d());ze(()=>{const L=String(a()??"");xe(()=>{c(y)!==L&&V(y,L,!0)})}),ze(()=>{const L=c(y).trim()?Number(c(y)):NaN;a(Number.isNaN(L)?void 0:L)}),ze(()=>{c(b)&&s(m()&&(a()===void 0||c(y)==="")||c(y)!==void 0&&c(y)!==""&&(Number.isNaN(Number(c(y)))||typeof u()=="number"&&Number(c(y)||0)<u()||typeof d()=="number"&&Number(c(y)||0)>d()))});const $=()=>{c(x)||Number.isNaN(Number(c(y)))||V(y,Number(Number(c(y)||0)-f()).toFixed(c(w)),!0)},A=()=>{c(E)||Number.isNaN(Number(c(y)))||V(y,Number(Number(c(y)||0)+f()).toFixed(c(w)),!0)};var k=bW();let T;var C=F(k),P=F(C);{const L=K=>{var G=X(),W=M(G);{var Y=q=>{var J=X(),Q=M(J);Ue(Q,()=>e.increaseIcon),S(q,J)},R=q=>{Qe(q,{name:"expand_less"})};U(W,q=>{e.increaseIcon?q(Y):q(R,!1)})}S(K,G)};let D=_(()=>p()||g()||Number.isNaN(Number(a()))||c(E)),B=_(()=>r()("_sui.number_input.increase"));et(P,{iconic:!0,get disabled(){return c(D)},get"aria-label"(){return c(B)},get"aria-controls"(){return n},onclick:()=>{A()},startIcon:L,$$slots:{startIcon:!0}})}var O=z(P,2);{const L=K=>{var G=X(),W=M(G);{var Y=q=>{var J=X(),Q=M(J);Ue(Q,()=>e.decreaseIcon),S(q,J)},R=q=>{Qe(q,{name:"expand_more"})};U(W,q=>{e.decreaseIcon?q(Y):q(R,!1)})}S(K,G)};let D=_(()=>p()||g()||Number.isNaN(Number(a()))||c(x)),B=_(()=>r()("_sui.number_input.decrease"));et(O,{iconic:!0,get disabled(){return c(D)},get"aria-label"(){return c(B)},get"aria-controls"(){return n},onclick:()=>{$()},startIcon:L,$$slots:{startIcon:!0}})}var I=z(C,2);{let L=_(()=>Number(a()||0)),D=_(()=>c(w)>0?"decimal":"numeric");Yn(I,Qt(()=>v,{role:"spinbutton",get id(){return n},spellcheck:"false",get flex(){return l()},get hidden(){return h()},get disabled(){return p()},get readonly(){return g()},get required(){return m()},get invalid(){return s()},get"aria-valuenow"(){return c(L)},get"aria-valuemin"(){return u()},get"aria-valuemax"(){return d()},get inputmode(){return c(D)},onkeydown:B=>{const{key:K,ctrlKey:G,metaKey:W,altKey:Y,shiftKey:R}=B,q=R||Y||G||W;K==="ArrowDown"&&!q&&(B.preventDefault(),$()),K==="ArrowUp"&&!q&&(B.preventDefault(),A()),c(b)||V(b,!0)},oninput:()=>{c(b)||V(b,!0)},get onChange(){return e.onChange},get value(){return c(y)},set value(B){V(y,B,!0)}}))}Z(()=>{T=hn(k,1,`sui number-input ${e.class??""}`,"svelte-1o8zacf",T,{flex:l(),disabled:p(),readonly:g()}),Se(k,"hidden",h())}),S(t,k),se(),o()}var xW=j('<div role="none"><!> <!></div>');const kW={hash:"svelte-1j9a3y7",code:".password-input.svelte-1j9a3y7 {display:inline-flex;align-items:center;margin:var(--sui-focus-ring-width);min-width:var(--sui-textbox-singleline-min-width);}.password-input.flex.svelte-1j9a3y7 {width:-moz-available;width:-webkit-fill-available;width:stretch;min-width:0;}.password-input.svelte-1j9a3y7 .text-input {flex:auto;margin:0 !important;width:0;min-width:0 !important;}.password-input.svelte-1j9a3y7 input {border-start-end-radius:0;border-end-end-radius:0;}.password-input.svelte-1j9a3y7 button {flex:none;margin-block:0;margin-inline-start:-1px;margin-inline-end:0;border-width:1px;border-color:var(--sui-textbox-border-color);width:var(--sui-textbox-height);aspect-ratio:1/1;}.password-input.svelte-1j9a3y7 button:last-child {border-start-start-radius:0;border-start-end-radius:4px;border-end-end-radius:4px;border-end-start-radius:0;}.password-input.svelte-1j9a3y7 button .icon {font-size:var(--sui-font-size-xx-large);}"};function Zg(t,e){const n=Jn();ae(e,!0),ke(t,kW);const r=()=>H(ce,"$_",i),[i,o]=ve();let a=N(e,"value",15),s=N(e,"flex",3,!1),l=N(e,"monospace",3,!0),u=N(e,"hidden",3,!1),d=N(e,"disabled",3,!1),f=N(e,"readonly",3,!1),h=N(e,"required",3,!1),p=N(e,"invalid",3,!1),g=ot(e,["$$slots","$$events","$$legacy","value","flex","monospace","class","hidden","disabled","readonly","required","invalid","children","visibilityIcon"]),m=ie(void 0),v=ie(!1);ze(()=>{c(m)?.setAttribute("type",c(v)?"text":"password")});var b=xW();let y;var w=F(b);Yn(w,Qt(()=>g,{get id(){return n},type:"password",spellcheck:"false",get flex(){return s()},get monospace(){return l()},get hidden(){return u()},get disabled(){return d()},get readonly(){return f()},get required(){return h()},get invalid(){return p()},get element(){return c(m)},set element(E){V(m,E,!0)},get value(){return a()},set value(E){a(E)}}));var x=z(w,2);{const E=k=>{var T=X(),C=M(T);{var P=I=>{var L=X(),D=M(L);Ue(D,()=>e.visibilityIcon),S(I,L)},O=I=>{{let L=_(()=>c(v)?"visibility_off":"visibility");Qe(I,{get name(){return c(L)}})}};U(C,I=>{e.visibilityIcon?I(P):I(O,!1)})}S(k,T)};let $=_(()=>d()||f()),A=_(()=>r()(c(v)?"_sui.password_input.hide_password":"_sui.password_input.show_password"));et(x,{iconic:!0,get disabled(){return c($)},get pressed(){return c(v)},get"aria-label"(){return c(A)},get"aria-controls"(){return n},onclick:()=>{V(v,!c(v))},startIcon:E,$$slots:{startIcon:!0}})}Z(()=>{y=hn(b,1,`sui password-input ${e.class??""}`,"svelte-1j9a3y7",y,{flex:s(),disabled:d(),readonly:f()}),Se(b,"hidden",u())}),S(t,b),se(),o()}var SW=j('<link rel="preload" as="style"/> <link rel="stylesheet"/>',1),EW=j('<meta name="viewport"/> <meta name="google" content="notranslate"/> <link rel="preconnect" href="https://fonts.googleapis.com"/> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="anonymous"/> <!>',1),TW=j('<div class="font-loader svelte-lqgoh9" aria-hidden="true">Loading <strong>Sveltia</strong> <em>UI</em> <span role="none" class="material-symbols-outlined">favorite</span></div> <div><!></div>',1);const $W={hash:"svelte-lqgoh9",code:`:root,
|
|
416
|
+
${m}`;v.inputValue=k}))}),ze(()=>{v.initialized&&(v.inputValue,xe(()=>{const{lang:k="plain",code:T=""}=v.inputValue.match(/^```(?<lang>\w+?)?\n(?:(?<code>.*)\n)?```/s)?.groups??{};a()!==k&&a(k),o()!==T&&o(T)}))});var b=JG(),y=M(b);mt(y,()=>({...g,role:"none",class:"sui code-editor",hidden:u(),[Nr]:{flex:l()}}),void 0,void 0,void 0,"svelte-r5gpai");var w=F(y);{var x=k=>{YG(k,{get disabled(){return d()},get readonly(){return f()}})};U(w,k=>{s()&&k(x)})}var E=z(w,2);ON(E,{get hidden(){return u()},get disabled(){return d()},get readonly(){return f()},get required(){return h()},get invalid(){return p()}});var $=z(y,2);{var A=k=>{nr(k,{get show(){return v.showConverterError},set show(T){v.showConverterError=T},children:(T,C)=>{Hn(T,{status:"error",children:(P,O)=>{var I=Fe();Z(L=>ne(I,L),[()=>n()("_sui.text_editor.converter_error")]),S(P,I)},$$slots:{default:!0}})},$$slots:{default:!0}})};U($,k=>{v.showConverterError&&k(A)})}S(t,b),se(),i()}var QG=j('<div class="clone svelte-8gr249" aria-hidden="true"> </div>'),eW=j('<div role="none"><textarea></textarea> <!></div>');const tW={hash:"svelte-8gr249",code:".text-area.svelte-8gr249 {display:inline-grid;margin:var(--sui-focus-ring-width);min-width:var(--sui-textbox-multiline-min-width);}.text-area[hidden].svelte-8gr249 {display:none;}.text-area.flex.svelte-8gr249 {width:-moz-available;width:-webkit-fill-available;width:stretch;min-width:0;}:is(textarea.svelte-8gr249, .clone.svelte-8gr249) {grid-area:1/1/2/2;display:block;margin:0;border-width:var(--sui-textbox-border-width, 1px);border-color:var(--sui-textbox-border-color);border-radius:var(--sui-textbox-border-radius);padding:var(--sui-textbox-multiline-padding);width:100%;min-height:8em;color:var(--sui-textbox-foreground-color);background-color:var(--sui-textbox-background-color);font-family:var(--sui-textbox-font-family);font-size:var(--sui-textbox-font-size);line-height:var(--sui-textbox-multiline-line-height);font-weight:var(--sui-textbox-font-weight, var(--sui-font-weight-normal, normal));text-align:var(--sui-textbox-text-align, start);text-indent:var(--sui-textbox-text-indent, 0);text-transform:var(--sui-textbox-text-transform, none);letter-spacing:var(--sui-textbox-letter-spacing, normal);word-spacing:var(--sui-word-spacing-normal, normal);transition:all 200ms;}:is(textarea:where(.svelte-8gr249), .clone:where(.svelte-8gr249)).resizing.svelte-8gr249 {transition-duration:0ms;}.svelte-8gr249:is(textarea:where(.svelte-8gr249), .clone:where(.svelte-8gr249)):focus {border-color:var(--sui-textbox-border-color-focus, var(--sui-primary-accent-color));color:var(--sui-textbox-foreground-color-focus, var(--sui-textbox-foreground-color));background-color:var(--sui-textbox-background-color-focus, var(--sui-textbox-background-color));}.svelte-8gr249:is(textarea:where(.svelte-8gr249), .clone:where(.svelte-8gr249)):is(:where(.svelte-8gr249):disabled, :where(.svelte-8gr249):read-only) {background-color:var(--sui-disabled-background-color);}textarea.svelte-8gr249 {resize:vertical;}textarea.auto-resize.svelte-8gr249 {overflow:hidden;resize:none;}textarea[aria-invalid=true].svelte-8gr249 {border-color:var(--sui-error-border-color);}.clone.svelte-8gr249 {overflow:hidden;visibility:hidden;white-space:pre-wrap;}"};function Zh(t,e){ae(e,!0),ke(t,tW);let n=N(e,"value",15,""),r=N(e,"flex",3,!1),i=N(e,"name",3,void 0),o=N(e,"autoResize",3,!1),a=N(e,"hidden",3,!1),s=N(e,"disabled",3,!1),l=N(e,"readonly",3,!1),u=N(e,"required",3,!1),d=N(e,"invalid",3,!1),f=ot(e,["$$slots","$$events","$$legacy","value","flex","name","autoResize","class","hidden","disabled","readonly","required","invalid","children"]);var h=eW();let p;var g=F(h);mt(g,()=>({...f,name:i(),dir:"auto",disabled:s()||void 0,readonly:l()||void 0,"aria-hidden":a(),"aria-disabled":s(),"aria-readonly":l(),"aria-required":u(),"aria-invalid":d(),[Nr]:{"auto-resize":o()}}),void 0,void 0,void 0,"svelte-8gr249");var m=z(g,2);{var v=b=>{var y=QG(),w=F(y);Z(()=>ne(w,n())),S(b,y)};U(m,b=>{o()&&b(v)})}Z(()=>{p=hn(h,1,`sui text-area ${e.class??""}`,"svelte-8gr249",p,{flex:r(),disabled:s(),readonly:l()}),Se(h,"hidden",a()),g.dir=g.dir}),pm(g,n),S(t,h),se()}function nW(t,e){ae(e,!0);const n=()=>H(ce,"$_",r),[r,i]=ve(),o=pr("editorStore"),a=_(()=>o.selection.inlineTypes.includes(e.type));{const s=d=>{Qe(d,{get name(){return ic[e.type].icon}})};let l=_(()=>n()(`_sui.text_editor.${ic[e.type].labelKey}`)),u=_(()=>!o.useRichText);et(t,{iconic:!0,get"aria-label"(){return c(l)},get"aria-controls"(){return`${o.editorId??""}-lexical-root`},get disabled(){return c(u)},get pressed(){return c(a)},onclick:async()=>{o.editor&&(await mv(o.editor),o.editor.dispatchCommand(Ua,e.type))},startIcon:s,$$slots:{startIcon:!0}})}se(),i()}function rW(t,e){ae(e,!0);const n=pr("editorStore");{const r=o=>{Qe(o,{get name(){return e.component.icon}})};let i=_(()=>!n.useRichText);et(t,{iconic:!0,get"aria-label"(){return e.component.label},get"aria-controls"(){return`${n.editorId??""}-lexical-root`},get disabled(){return c(i)},onclick:()=>{n.editor?.update(()=>{yd([e.component.createNode(),Tn()])})},startIcon:r,$$slots:{startIcon:!0}})}se()}var iW=j('<div role="none"><label> </label> <!></div>'),oW=j('<div role="none"><label> </label> <!></div> <!>',1),aW=j("<!> <!>",1);function sW(t,e){const n=Jn();ae(e,!0);const r=()=>H(ce,"$_",i),[i,o]=ve(),a="link",s=pr("editorStore"),l=_(()=>s.selection.inlineTypes.includes(a));let u=ie(!1),d=ie("create"),f=ie(!1),h=ie(""),p=ie("");const g=()=>{s.editor?.getEditorState().read(()=>{const k=GV().trim();V(h,k,!0),V(f,!!k),V(d,"create"),V(u,!0)})},m=()=>{s.editor?.dispatchCommand(Qy,null)},v=()=>{s.editor?.getEditorState().read(()=>{const k=Ge();if(De(k)){const T=k.anchor.getNode(),P=(T instanceof nc?T:Pf(T,nc))?.getURL();if(P){V(f,!0),V(h,P,!0),V(d,"update"),V(u,!0);return}}m()})},b=()=>{c(l)?v():g()},y=k=>{yy(k,"Enter")&&c(h)&&V(u,!1)},w=async k=>{if(k.detail.returnValue!=="cancel"&&c(d)!=="remove"){if(!s.editor)return;await new Promise(T=>{s.editor?.update(async()=>{let C=Ge()??wc()?.clone();if(De(C)||(C=iv()),!c(f)){V(p,c(p).trim(),!0),V(p,c(p)||c(h),!0);const{anchor:P,focus:O}=C,I=zn(c(p)),L=I.getKey();yd([I]),P.set(L,c(p).length,"text"),O.set(L,0,"text")}Br(C),T(void 0)})}),await mv(s.editor),s.editor.dispatchCommand(Qy,c(h))}V(h,""),V(p,"")},x=()=>{s.editor?.registerCommand(ML,k=>(yy(k,lL()?"Meta+K":"Ctrl+K")&&(k.preventDefault(),b()),!1),cf)};ze(()=>{s.editor&&x()});var E=aW(),$=M(E);{const k=P=>{Qe(P,{get name(){return ic[a].icon}})};let T=_(()=>r()(`_sui.text_editor.${ic[a].labelKey}`)),C=_(()=>!s.useRichText);et($,{iconic:!0,get"aria-label"(){return c(T)},get"aria-controls"(){return`${s.editorId??""}-lexical-root`},get disabled(){return c(C)},get pressed(){return c(l)},onclick:()=>{b()},startIcon:k,$$slots:{startIcon:!0}})}var A=z($,2);{const k=O=>{var I=X(),L=M(I);{var D=B=>{{let K=_(()=>r()("_sui.remove"));et(B,{variant:"secondary",get label(){return c(K)},onclick:()=>{m(),V(d,"remove"),V(u,!1)}})}};U(L,B=>{c(d)!=="create"&&B(D)})}S(O,I)};let T=_(()=>c(d)==="create"?r()("_sui.text_editor.insert_link"):r()("_sui.text_editor.update_link")),C=_(()=>!c(h)),P=_(()=>c(d)==="create"?r()("_sui.insert"):r()("_sui.update"));xo(A,{get title(){return c(T)},get okDisabled(){return c(C)},get okLabel(){return c(P)},onClose:O=>{w(O)},get open(){return c(u)},set open(O){V(u,O,!0)},get value(){return c(h)},set value(O){V(h,O,!0)},footerExtra:k,children:(O,I)=>{var L=oW(),D=M(L),B=F(D),K=F(B),G=z(B,2);Yn(G,{get id(){return`${n}-url`},flex:!0,"aria-label":"URL",onkeydown:R=>{y(R)},get value(){return c(h)},set value(R){V(h,R,!0)}});var W=z(D,2);{var Y=R=>{var q=iW(),J=F(q),Q=F(J),ee=z(J,2);Yn(ee,{get id(){return`${n}-text`},flex:!0,onkeydown:re=>{y(re)},get value(){return c(p)},set value(re){V(p,re,!0)}}),Z(re=>{Se(J,"for",`${n}-text`),ne(Q,re)},[()=>r()("_sui.text_editor.text")]),S(R,q)};U(W,R=>{c(f)||R(Y)})}Z(R=>{Se(B,"for",`${n}-url`),ne(K,R)},[()=>r()("_sui.text_editor.url")]),S(O,L)},$$slots:{footerExtra:!0,default:!0}})}S(t,E),se(),o()}function lW(t,e){ae(e,!0);const n=()=>H(ce,"$_",r),[r,i]=ve(),o=pr("editorStore");{const a=d=>{Qe(d,{name:"arrow_drop_down",class:"small-arrow"})},s=d=>{xr(d,{children:(f,h)=>{var p=X(),g=M(p);rt(g,17,()=>e.components,({id:m,label:v,icon:b,createNode:y})=>m,(m,v)=>{let b=()=>c(v).label,y=()=>c(v).icon,w=()=>c(v).createNode;vt(m,{get label(){return b()},onclick:()=>{o.editor?.update(()=>{yd([w()()])})},startIcon:E=>{var $=X(),A=M($);{var k=T=>{Qe(T,{get name(){return y()}})};U(A,T=>{y()&&T(k)})}S(E,$)},$$slots:{startIcon:!0}})}),S(f,p)},$$slots:{default:!0}})};let l=_(()=>!o.useRichText),u=_(()=>n()("_sui.insert"));ei(t,{get disabled(){return c(l)},get label(){return c(u)},endIcon:a,popup:s,$$slots:{endIcon:!0,popup:!0}})}se(),i()}function cW(t,e){ae(e,!0);const n=()=>H(ce,"$_",r),[r,i]=ve(),o=pr("editorStore"),a=_(()=>o.selection.blockType===e.type),s=async()=>{if(!o.editor)return;await mv(o.editor);const[,d]=e.type.match(/^heading-(\d)$/)??[];d&&o.editor.update(()=>{Lp(Ge(),()=>wl(`h${d}`))}),e.type==="paragraph"&&o.editor.update(()=>{Lp(Ge(),()=>Tn())}),e.type==="bulleted-list"&&o.editor.dispatchCommand(oN,void 0),e.type==="numbered-list"&&o.editor.dispatchCommand(aN,void 0),e.type==="blockquote"&&o.editor.update(()=>{Lp(Ge(),()=>pv())}),e.type==="code-block"&&o.editor.update(()=>{Lp(Ge(),()=>Io())})};var l=X(),u=M(l);fr(u,()=>c(a),d=>{{const f=p=>{Qe(p,{get name(){return ic[e.type].icon}})};let h=_(()=>n()(`_sui.text_editor.${ic[e.type].labelKey}`));Lg(d,{get label(){return c(h)},get checked(){return c(a)},onclick:()=>{c(a)||s()},startIcon:f,$$slots:{startIcon:!0}})}}),S(t,l),se(),i()}var uW=j("<!> <!>",1),dW=j("<!> <!>",1),fW=j("<!> <!> <!>",1),hW=j("<!> <!>",1),pW=j("<!> <!> <!> <!>",1);function gW(t,e){ae(e,!0);const n=()=>H(ce,"$_",r),[r,i]=ve();let o=N(e,"disabled",3,!1),a=N(e,"readonly",3,!1);const s=pr("editorStore"),l=_(()=>s.config.components.find(({id:h})=>c$.includes(h))),u=_(()=>s.config.components.filter(({id:h})=>!c$.includes(h))),d=_(()=>$u(["paragraph",...s.config.enabledButtons.filter(h=>l1.includes(h))])),f=_(()=>$u(s.config.enabledButtons.filter(h=>$N.includes(h))));{let h=_(()=>o()||a()),p=_(()=>n()("_sui.text_editor.text_editor"));NN(t,{get disabled(){return c(h)},get"aria-label"(){return c(p)},children:(g,m)=>{var v=pW(),b=M(v);{const k=O=>{{let I=_(()=>ic[s.selection.blockType??""]?.icon??"format_paragraph");Qe(O,{get name(){return c(I)}})}},T=O=>{{let I=_(()=>n()("_sui.text_editor.text_style_options"));xr(O,{get"aria-label"(){return c(I)},children:(L,D)=>{var B=X(),K=M(B);rt(K,16,()=>c(d),G=>G,(G,W)=>{cW(G,{get type(){return W}})}),S(L,B)},$$slots:{default:!0}})}};let C=_(()=>!s.useRichText),P=_(()=>n()("_sui.text_editor.show_text_style_options"));ei(b,{get disabled(){return c(C)},get"aria-label"(){return c(P)},get"aria-controls"(){return`${s.editorId??""}-lexical-root`},startIcon:k,popup:T,$$slots:{startIcon:!0,popup:!0}})}var y=z(b,2);{var w=k=>{var T=uW(),C=M(T);vi(C,{orientation:"vertical"});var P=z(C,2);{let O=_(()=>!s.useRichText);IN(P,{get disabled(){return c(O)}})}S(k,T)},x=k=>{var T=hW(),C=M(T);{var P=L=>{var D=dW(),B=M(D);vi(B,{orientation:"vertical"});var K=z(B,2);X6(K,{children:(G,W)=>{var Y=X(),R=M(Y);rt(R,16,()=>c(f),q=>q,(q,J)=>{var Q=X(),ee=M(Q);{var re=de=>{sW(de,{})},te=de=>{nW(de,{get type(){return J}})};U(ee,de=>{J==="link"?de(re):de(te,!1)})}S(q,Q)}),S(G,Y)},$$slots:{default:!0}}),S(L,D)};U(C,L=>{c(f).length&&L(P)})}var O=z(C,2);{var I=L=>{var D=fW(),B=M(D);vi(B,{orientation:"vertical"});var K=z(B,2);{var G=R=>{rW(R,{get component(){return c(l)}})};U(K,R=>{c(l)&&R(G)})}var W=z(K,2);{var Y=R=>{lW(R,{get components(){return c(u)}})};U(W,R=>{c(u).length&&R(Y)})}S(L,D)};U(O,L=>{s.config.components.length&&L(I)})}S(k,T)};U(y,k=>{s.selection.blockType==="code-block"?k(w):k(x,!1)})}var E=z(y,2);_i(E,{flex:!0});var $=z(E,2);{var A=k=>{{const T=O=>{Qe(O,{name:"markdown"})};let C=_(()=>!s.useRichText),P=_(()=>n()("_sui.text_editor.edit_in_markdown"));et(k,{iconic:!0,get disabled(){return s.hasConverterError},get pressed(){return c(C)},get"aria-label"(){return c(P)},onclick:()=>{s.useRichText=!s.useRichText,s.useRichText&&s.convertMarkdown()},startIcon:T,$$slots:{startIcon:!0}})}};U($,k=>{s.config.modes.length>1&&k(A)})}S(g,v)},$$slots:{default:!0}})}se(),i()}var mW=j("<div><!> <!> <!></div> <!>",1);const vW={hash:"svelte-uebo40",code:".text-editor.svelte-uebo40 {margin:var(--sui-focus-ring-width);width:calc(100% - var(--sui-focus-ring-width) * 2);}.text-editor.svelte-uebo40 .sui.text-area {margin:0 !important;width:100% !important;min-width:auto;}.text-editor.svelte-uebo40 .sui.text-area textarea {border-start-start-radius:0 !important;border-start-end-radius:0 !important;border-end-start-radius:var(--sui-textbox-border-radius) !important;border-end-end-radius:var(--sui-textbox-border-radius) !important;}"};function _W(t,e){ae(e,!0),ke(t,vW);const n=()=>H(ce,"$_",r),[r,i]=ve();let o=N(e,"value",15,""),a=N(e,"flex",3,!1),s=N(e,"modes",19,()=>["rich-text","plain-text"]),l=N(e,"buttons",19,()=>[...$N,...l1]),u=N(e,"components",19,()=>[]),d=N(e,"hidden",3,!1),f=N(e,"disabled",3,!1),h=N(e,"readonly",3,!1),p=N(e,"required",3,!1),g=N(e,"invalid",3,!1),m=ot(e,["$$slots","$$events","$$legacy","value","flex","modes","buttons","components","hidden","disabled","readonly","required","invalid","children"]);const v=LN();v.config={...v.config,modes:s(),enabledButtons:l(),components:u()},_w("editorStore",v),ze(()=>{if(!v.initialized)return;const k=o();xe(()=>{v.inputValue=k})}),ze(()=>{if(!v.initialized)return;const k=v.inputValue;xe(()=>{o()!==k&&o(k)})});var b=mW(),y=M(b);mt(y,()=>({...m,role:"none",class:"sui text-editor",hidden:d(),[Nr]:{flex:a()}}),void 0,void 0,void 0,"svelte-uebo40");var w=F(y);gW(w,{get disabled(){return f()},get readonly(){return h()}});var x=z(w,2);{let k=_(()=>!v.useRichText||d());ON(x,{get hidden(){return c(k)},get disabled(){return f()},get readonly(){return h()},get required(){return p()},get invalid(){return g()}})}var E=z(x,2);{let k=_(()=>v.useRichText||d());Zh(E,{autoResize:!0,get flex(){return a()},get hidden(){return c(k)},get disabled(){return f()},get readonly(){return h()},get required(){return p()},get invalid(){return g()},get value(){return v.inputValue},set value(T){v.inputValue=T}})}var $=z(y,2);{var A=k=>{nr(k,{get show(){return v.showConverterError},set show(T){v.showConverterError=T},children:(T,C)=>{Hn(T,{status:"error",children:(P,O)=>{var I=Fe();Z(L=>ne(I,L),[()=>n()("_sui.text_editor.converter_error")]),S(P,I)},$$slots:{default:!0}})},$$slots:{default:!0}})};U($,k=>{v.showConverterError&&k(A)})}S(t,b),se(),i()}var bW=j('<div role="none"><div role="none" class="buttons svelte-g48qe8"><!> <!></div> <!></div>');const yW={hash:"svelte-g48qe8",code:".number-input.svelte-g48qe8 {display:inline-flex;align-items:center;margin:var(--sui-focus-ring-width);min-width:var(--sui-textbox-singleline-min-width);}.number-input.flex.svelte-g48qe8 {width:-moz-available;width:-webkit-fill-available;width:stretch;min-width:0;}.number-input.svelte-g48qe8 :not(:first-child) input {border-start-start-radius:0;border-end-start-radius:0;}.number-input.svelte-g48qe8 :not(:last-child) input {border-start-end-radius:0;border-end-end-radius:0;}.number-input.svelte-g48qe8 :not(.disabled) button[aria-disabled=true] {filter:grayscale(0) opacity(1);}.number-input.svelte-g48qe8 :not(.disabled) button[aria-disabled=true] * {filter:grayscale(1) opacity(0.35);}.number-input.svelte-g48qe8 .text-input {flex:auto;margin:0 !important;width:0;min-width:0 !important;}.buttons.svelte-g48qe8 {display:flex;flex-direction:column;width:24px;height:var(--sui-textbox-height);}.buttons.svelte-g48qe8 button {flex:none;margin:0 !important;border-width:1px;border-color:var(--sui-textbox-border-color);width:100%;height:50%;}.buttons.svelte-g48qe8 button:first-of-type {border-block-start-width:1px;border-block-end-width:0;border-inline-end-width:0;border-inline-start-width:1px;border-start-end-radius:0;border-end-end-radius:0;border-end-start-radius:0;}.buttons.svelte-g48qe8 button:last-of-type {border-block-start-width:0;border-block-end-width:1px;border-inline-end-width:0;border-inline-start-width:1px;border-start-start-radius:0;border-start-end-radius:0;border-end-end-radius:0;}.buttons.svelte-g48qe8 button .icon {font-size:20px;}"};function wW(t,e){const n=Jn();ae(e,!0),ke(t,yW);const r=()=>H(ce,"$_",i),[i,o]=ve();let a=N(e,"value",15),s=N(e,"invalid",15,!1),l=N(e,"flex",3,!1),u=N(e,"min",3,void 0),d=N(e,"max",3,void 0),f=N(e,"step",3,1),h=N(e,"hidden",3,!1),p=N(e,"disabled",3,!1),g=N(e,"readonly",3,!1),m=N(e,"required",3,!1),v=ot(e,["$$slots","$$events","$$legacy","value","invalid","flex","min","max","step","class","hidden","disabled","readonly","required","children","increaseIcon","decreaseIcon","onChange"]),b=ie(!1),y=ie("");const w=_(()=>String(f()).split(".")[1]?.length||0),x=_(()=>typeof u()=="number"&&Number(c(y)||0)<=u()),E=_(()=>typeof d()=="number"&&Number(c(y)||0)>=d());ze(()=>{const L=String(a()??"");xe(()=>{c(y)!==L&&V(y,L,!0)})}),ze(()=>{const L=c(y).trim()?Number(c(y)):NaN;a(Number.isNaN(L)?void 0:L)}),ze(()=>{c(b)&&s(m()&&(a()===void 0||c(y)==="")||c(y)!==void 0&&c(y)!==""&&(Number.isNaN(Number(c(y)))||typeof u()=="number"&&Number(c(y)||0)<u()||typeof d()=="number"&&Number(c(y)||0)>d()))});const $=()=>{c(x)||Number.isNaN(Number(c(y)))||V(y,Number(Number(c(y)||0)-f()).toFixed(c(w)),!0)},A=()=>{c(E)||Number.isNaN(Number(c(y)))||V(y,Number(Number(c(y)||0)+f()).toFixed(c(w)),!0)};var k=bW();let T;var C=F(k),P=F(C);{const L=K=>{var G=X(),W=M(G);{var Y=q=>{var J=X(),Q=M(J);Ue(Q,()=>e.increaseIcon),S(q,J)},R=q=>{Qe(q,{name:"expand_less"})};U(W,q=>{e.increaseIcon?q(Y):q(R,!1)})}S(K,G)};let D=_(()=>p()||g()||Number.isNaN(Number(a()))||c(E)),B=_(()=>r()("_sui.number_input.increase"));et(P,{iconic:!0,get disabled(){return c(D)},get"aria-label"(){return c(B)},get"aria-controls"(){return n},onclick:()=>{A()},startIcon:L,$$slots:{startIcon:!0}})}var O=z(P,2);{const L=K=>{var G=X(),W=M(G);{var Y=q=>{var J=X(),Q=M(J);Ue(Q,()=>e.decreaseIcon),S(q,J)},R=q=>{Qe(q,{name:"expand_more"})};U(W,q=>{e.decreaseIcon?q(Y):q(R,!1)})}S(K,G)};let D=_(()=>p()||g()||Number.isNaN(Number(a()))||c(x)),B=_(()=>r()("_sui.number_input.decrease"));et(O,{iconic:!0,get disabled(){return c(D)},get"aria-label"(){return c(B)},get"aria-controls"(){return n},onclick:()=>{$()},startIcon:L,$$slots:{startIcon:!0}})}var I=z(C,2);{let L=_(()=>Number(a()||0)),D=_(()=>c(w)>0?"decimal":"numeric");Yn(I,Qt(()=>v,{role:"spinbutton",get id(){return n},spellcheck:"false",get flex(){return l()},get hidden(){return h()},get disabled(){return p()},get readonly(){return g()},get required(){return m()},get invalid(){return s()},get"aria-valuenow"(){return c(L)},get"aria-valuemin"(){return u()},get"aria-valuemax"(){return d()},get inputmode(){return c(D)},onkeydown:B=>{const{key:K,ctrlKey:G,metaKey:W,altKey:Y,shiftKey:R}=B,q=R||Y||G||W;K==="ArrowDown"&&!q&&(B.preventDefault(),$()),K==="ArrowUp"&&!q&&(B.preventDefault(),A()),c(b)||V(b,!0)},oninput:()=>{c(b)||V(b,!0)},get onChange(){return e.onChange},get value(){return c(y)},set value(B){V(y,B,!0)}}))}Z(()=>{T=hn(k,1,`sui number-input ${e.class??""}`,"svelte-g48qe8",T,{flex:l(),disabled:p(),readonly:g()}),Se(k,"hidden",h())}),S(t,k),se(),o()}var xW=j('<div role="none"><!> <!></div>');const kW={hash:"svelte-17oo5xc",code:".password-input.svelte-17oo5xc {display:inline-flex;align-items:center;margin:var(--sui-focus-ring-width);min-width:var(--sui-textbox-singleline-min-width);}.password-input.flex.svelte-17oo5xc {width:-moz-available;width:-webkit-fill-available;width:stretch;min-width:0;}.password-input.svelte-17oo5xc .text-input {flex:auto;margin:0 !important;width:0;min-width:0 !important;}.password-input.svelte-17oo5xc input {border-start-end-radius:0;border-end-end-radius:0;}.password-input.svelte-17oo5xc button {flex:none;margin-block:0;margin-inline-start:-1px;margin-inline-end:0;border-width:1px;border-color:var(--sui-textbox-border-color);width:var(--sui-textbox-height);aspect-ratio:1/1;}.password-input.svelte-17oo5xc button:last-child {border-start-start-radius:0;border-start-end-radius:4px;border-end-end-radius:4px;border-end-start-radius:0;}.password-input.svelte-17oo5xc button .icon {font-size:var(--sui-font-size-xx-large);}"};function Zg(t,e){const n=Jn();ae(e,!0),ke(t,kW);const r=()=>H(ce,"$_",i),[i,o]=ve();let a=N(e,"value",15),s=N(e,"flex",3,!1),l=N(e,"monospace",3,!0),u=N(e,"hidden",3,!1),d=N(e,"disabled",3,!1),f=N(e,"readonly",3,!1),h=N(e,"required",3,!1),p=N(e,"invalid",3,!1),g=ot(e,["$$slots","$$events","$$legacy","value","flex","monospace","class","hidden","disabled","readonly","required","invalid","children","visibilityIcon"]),m=ie(void 0),v=ie(!1);ze(()=>{c(m)?.setAttribute("type",c(v)?"text":"password")});var b=xW();let y;var w=F(b);Yn(w,Qt(()=>g,{get id(){return n},type:"password",spellcheck:"false",get flex(){return s()},get monospace(){return l()},get hidden(){return u()},get disabled(){return d()},get readonly(){return f()},get required(){return h()},get invalid(){return p()},get element(){return c(m)},set element(E){V(m,E,!0)},get value(){return a()},set value(E){a(E)}}));var x=z(w,2);{const E=k=>{var T=X(),C=M(T);{var P=I=>{var L=X(),D=M(L);Ue(D,()=>e.visibilityIcon),S(I,L)},O=I=>{{let L=_(()=>c(v)?"visibility_off":"visibility");Qe(I,{get name(){return c(L)}})}};U(C,I=>{e.visibilityIcon?I(P):I(O,!1)})}S(k,T)};let $=_(()=>d()||f()),A=_(()=>r()(c(v)?"_sui.password_input.hide_password":"_sui.password_input.show_password"));et(x,{iconic:!0,get disabled(){return c($)},get pressed(){return c(v)},get"aria-label"(){return c(A)},get"aria-controls"(){return n},onclick:()=>{V(v,!c(v))},startIcon:E,$$slots:{startIcon:!0}})}Z(()=>{y=hn(b,1,`sui password-input ${e.class??""}`,"svelte-17oo5xc",y,{flex:s(),disabled:d(),readonly:f()}),Se(b,"hidden",u())}),S(t,b),se(),o()}var SW=j('<link rel="preload" as="style"/> <link rel="stylesheet"/>',1),EW=j('<meta name="viewport"/> <meta name="google" content="notranslate"/> <link rel="preconnect" href="https://fonts.googleapis.com"/> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="anonymous"/> <!>',1),TW=j('<div class="font-loader svelte-nj5xzu" aria-hidden="true">Loading <strong>Sveltia</strong> <em>UI</em> <span role="none" class="material-symbols-outlined">favorite</span></div> <div><!></div>',1);const $W={hash:"svelte-nj5xzu",code:`:root,
|
|
417
417
|
:host {--sui-base-hue: 210;--sui-highlight-foreground-color: hsl(var(--sui-foreground-color-1-hsl));--sui-primary-foreground-color: hsl(var(--sui-foreground-color-2-hsl));--sui-secondary-foreground-color: hsl(var(--sui-foreground-color-3-hsl));--sui-tertiary-foreground-color: hsl(var(--sui-foreground-color-4-hsl));--sui-disabled-foreground-color: hsl(var(--sui-foreground-color-5-hsl));--sui-error-foreground-color: hsl(
|
|
418
418
|
var(--sui-error-color-hue) var(--sui-alert-foreground-color-saturation)
|
|
419
419
|
var(--sui-alert-foreground-color-lightness)
|
|
@@ -471,9 +471,9 @@ ${m}`;v.inputValue=k}))}),ze(()=>{v.initialized&&(v.inputValue,xe(()=>{const{lan
|
|
|
471
471
|
@media (prefers-reduced-motion) {*,
|
|
472
472
|
::before,
|
|
473
473
|
::after {scroll-behavior:auto;transition-duration:1ms !important;}
|
|
474
|
-
}::selection {background-color:var(--sui-primary-accent-color-translucent);}* {-webkit-tap-highlight-color:transparent;}:focus {z-index:1;outline-width:0;}:focus-visible {outline-color:var(--sui-primary-accent-color-translucent);z-index:2;}h1 {margin:var(--sui-h1-margin, var(--sui-heading-margin));font-size:var(--sui-h1-font-size, 32px);font-family:var(--sui-h1-font-family, var(--sui-heading-font-family));font-weight:var(--sui-h1-font-weight, var(--sui-heading-font-weight));line-height:var(--sui-h1-line-height, var(--sui-heading-line-height));}h2 {margin:var(--sui-h2-margin, var(--sui-heading-margin));font-size:var(--sui-h2-font-size, 28px);font-family:var(--sui-h2-font-family, var(--sui-heading-font-family));font-weight:var(--sui-h2-font-weight, var(--sui-heading-font-weight));line-height:var(--sui-h2-line-height, var(--sui-heading-line-height));}h3 {margin:var(--sui-h3-margin, var(--sui-heading-margin));font-size:var(--sui-h3-font-size, 24px);font-family:var(--sui-h3-font-family, var(--sui-heading-font-family));font-weight:var(--sui-h3-font-weight, var(--sui-heading-font-weight));line-height:var(--sui-h3-line-height, var(--sui-heading-line-height));}h4 {margin:var(--sui-h4-margin, var(--sui-heading-margin));font-size:var(--sui-h4-font-size, 20px);font-family:var(--sui-h4-font-family, var(--sui-heading-font-family));font-weight:var(--sui-h4-font-weight, var(--sui-heading-font-weight));line-height:var(--sui-h4-line-height, var(--sui-heading-line-height));}h5 {margin:var(--sui-h5-margin, var(--sui-heading-margin));font-size:var(--sui-h5-font-size, 16px);font-family:var(--sui-h5-font-family, var(--sui-heading-font-family));font-weight:var(--sui-h5-font-weight, var(--sui-heading-font-weight));line-height:var(--sui-h5-line-height, var(--sui-heading-line-height));}h6 {margin:var(--sui-h6-margin, var(--sui-heading-margin));font-size:var(--sui-h6-font-size, 12px);font-family:var(--sui-h6-font-family, var(--sui-heading-font-family));font-weight:var(--sui-h6-font-weight, var(--sui-heading-font-weight));line-height:var(--sui-h6-line-height, var(--sui-heading-line-height));}strong {font-weight:var(--sui-font-weight-bold, bold);}a {color:var(--sui-primary-accent-color-text);text-decoration:none;text-underline-offset:2px;}a:is(:hover, :focus, :active) {text-decoration:underline;}:is(:root, :host)[data-underline-links=true].svelte-lqgoh9 a {text-decoration:underline;}:is(p, ul, ol, dl) {margin:var(--sui-paragraph-margin) 0;line-height:var(--sui-line-height-comfortable);}:is(ul, ol) {padding-inline:2em;}:is(code, pre) {border-radius:4px;background-color:var(--sui-code-background-color);font-family:var(--sui-font-family-monospace);font-size:var(--sui-font-size-monospace);vertical-align:-0.05em;}pre {padding:8px;line-height:var(--sui-line-height-compact);-webkit-user-select:text;user-select:text;}code {padding:2px 4px;}table {border-collapse:collapse;}:is(th, td) {border:1px solid var(--sui-textbox-border-color);padding:8px;}blockquote {margin-inline:16px 0;border-inline-start:4px solid var(--sui-textbox-border-color);padding-inline-start:12px;}:is(.disabled, .readonly, [aria-disabled=true], [aria-readonly=true], [inert]):not(body) {cursor:default;pointer-events:none;-webkit-user-select:none;user-select:none;filter:grayscale(1) opacity(0.35);}:is(.disabled, .readonly, [aria-disabled=true], [aria-readonly=true], [inert]):not(body) * {filter:grayscale(0) opacity(1);}:is(.disabled, .readonly, [aria-disabled=true], [aria-readonly=true], [inert]) * {cursor:default;pointer-events:none;-webkit-user-select:none;user-select:none;}.font-loader.svelte-lqgoh9 {position:absolute;inset-inline-start:-99999px;font-family:var(--sui-font-family-default);}.app-shell.svelte-lqgoh9 {position:fixed;inset:0;overflow:hidden;width:100%;height:100%;color:var(--sui-primary-foreground-color);background-color:var(--sui-primary-background-color);font-family:var(--sui-font-family-default);font-size:var(--sui-font-size-default);font-weight:var(--sui-font-weight-normal, normal);word-spacing:var(--sui-word-spacing-normal);-webkit-user-select:none;user-select:none;touch-action:none;cursor:default;}.app-shell.horizontal.svelte-lqgoh9 {display:flex;flex-direction:row;overflow:hidden;}.app-shell.vertical.svelte-lqgoh9 {display:flex;flex-direction:column;overflow:hidden;}`};function AW(t,e){ae(e,!0),ke(t,$W);let n=N(e,"orientation",3,"horizontal"),r=ot(e,["$$slots","$$events","$$legacy","orientation","children"]);const i=["https://fonts.googleapis.com/css2?family=Merriweather+Sans:ital,wght@0,300..800;1,300..800&family=Noto+Sans+Mono:wght@100..900&display=swap","https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=block"];let o=ie(void 0);Vt(()=>{const p=globalThis.matchMedia("(prefers-color-scheme: dark)"),{dataset:g}=document.documentElement,m=()=>{g.autoTheming!=="false"&&(g.theme=p.matches?"dark":"light")};m(),p.onchange=()=>{m()},globalThis.setTimeout(()=>{c(o)?.remove()},1e3)});var a=TW();_C("lqgoh9",p=>{var g=EW(),m=M(g),v=z(m,8);rt(v,17,()=>i,yr,(b,y)=>{var w=SW(),x=M(w),E=z(x,2);Z(()=>{Se(x,"href",c(y)),Se(E,"href",c(y))}),S(b,w)}),Z(b=>Se(m,"content",b),[()=>["width=device-width","initial-scale=1","maximum-scale=1","interactive-widget=resizes-content"].join(", ")]),S(p,g)});var s=M(a);Co(s,"",{},{opacity:"0"}),St(s,p=>V(o,p),()=>c(o));var l=z(s,2),u=p=>p.preventDefault(),d=p=>p.preventDefault(),f=p=>{if(document.documentElement.matches('[data-env="dev"]'))return;const g=p.target;document.documentElement.matches('[data-env="dev"]')||g?.matches("input, textarea")&&"maxLength"in g||g?.closest('[role="textbox"]')?.contentEditable==="true"||p.preventDefault()};mt(l,()=>({...r,role:"none",class:`sui app-shell ${n()??""}`,ondragover:u,ondrop:d,oncontextmenu:f}),void 0,void 0,void 0,"svelte-lqgoh9");var h=F(l);Ue(h,()=>e.children??He),S(t,a),se()}var CW=j('<div role="none" class="sui empty-state svelte-gzmcai"><!></div>');const PW={hash:"svelte-gzmcai",code:".empty-state.svelte-gzmcai {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding:16px;width:100%;height:100%;text-align:center;}"};function cr(t,e){ke(t,PW);let n=N(e,"children",3,void 0);var r=CW(),i=F(r);Ue(i,()=>n()??He),S(t,r)}var OW=j('<div><div role="none" class="inner svelte-1jqj39k"><!></div></div>');const LW={hash:"svelte-1jqj39k",code:".inner.svelte-1jqj39k {display:contents;}"};function ma(t,e){ke(t,LW);let n=N(e,"hidden",3,!1),r=N(e,"disabled",3,!1),i=ot(e,["$$slots","$$events","$$legacy","class","hidden","disabled","children"]);var o=OW();mt(o,()=>({...i,role:"group",class:`sui group ${e.class??""}`,hidden:n(),"aria-hidden":n(),"aria-disabled":r()}),void 0,void 0,void 0,"svelte-1jqj39k");var a=F(o),s=F(a);Ue(s,()=>e.children??He),Z(()=>a.inert=r()),S(t,o)}sL();const RN='<svg viewBox="0 0 800 800" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientUnits="userSpaceOnUse" x1="400" x2="400" y1="0" y2="800"><stop offset="0" stop-color="#f0980b"/><stop offset="1" stop-color="#ff1d00"/></linearGradient><clipPath id="b"><rect height="800" rx="80" width="800"/></clipPath><rect fill="url(#a)" height="800" rx="80" width="800"/><g style="clip-path:url(#b);fill:none;stroke:#fff;stroke-linecap:round;stroke-linejoin:round;stroke-width:180"><path d="m320-80-200 320 200 320-200 320"/><path d="m400 240 200 320 200-320"/></g></svg>',IW=(t,{field:e,pattern:n}={field:"",pattern:""})=>{if(!e)return t;if(e==="fileType")return t.filter(({path:i})=>sd(i)===n);const r=fd(n);return t.filter(i=>{const o=i[e];return r?r.test(String(o??"")):o===n})},NW=(t,{field:e,pattern:n}={field:"",pattern:void 0})=>{if(!e)return t.length?{"*":t}:{};const r=fd(n),i={},o=oe(ce)("other");return t.forEach(a=>{const s=a[e];let l;r?[l=o]=String(s??"").match(r)??[]:l=s,l in i||(i[l]=[]),i[l].push(a)}),Object.fromEntries(Object.entries(i).sort(([a],[s])=>eo(a,s)))},f$=(t,e)=>{const{commitAuthor:{name:n,login:r,email:i}={},commitDate:o}=t;return e==="commit_author"?n||r||i:e==="commit_date"?o:e==="name"?t.name.split(".")[0]:t[e]??""},RW=(t,{key:e,order:n}={})=>{if(!e||!n)return t;const r=[...t],i={commit_author:String,commit_date:Date}[e]||r[0]?.[e]?.constructor||String;return r.sort((o,a)=>{const s=f$(o,e),l=f$(a,e);return i===String?eo(s,l):i===Date?Number(s)-Number(l):s-l}),n==="descending"&&r.reverse(),r},nl=it(!1),vs=it(!1),MW=sn([Oo],([t],e)=>{e(!!t.files.length)}),vv=({collectionName:t,fileName:e,internalPath:n})=>{if(t===void 0)return oe(ce)(n===void 0?"all_assets":"global_assets");const r=ki(t),i=r?Za(r):t;if(!e)return i;const o=r?pd(r,e):void 0,a=o?Fh(o):e;return`${i} › ${a}`},_s=it({type:"grid",showInfo:!0}),kc=sn([Wn,Po],([t,e],n)=>{t&&e&&e.internalPath!==void 0?n(t.filter(({folder:r})=>fn(r,e))):n(t?[...t]:[])}),u1=sn([kc,_s],([t,e],n)=>{let r=[...t];r=RW(r,e.sort),r=IW(r,e.filter);const i=NW(r,e.group);fn(oe(u1),i)||n(i)});kc.subscribe(t=>{Zf.set([]),oe(ht).devModeEnabled&&console.info("listedAssets",t)});const mn=it(!1),Ta=it(!1),Qh=it(!1),Cd=it(!0),DW=()=>{const t=globalThis.matchMedia("(width < 768px)"),e=globalThis.matchMedia("(768px <= width < 1024px)"),n=globalThis.matchMedia("(1024px <= width)"),r=globalThis.matchMedia("(pointer: fine)"),i=()=>mn.set(t.matches),o=()=>Ta.set(e.matches),a=()=>Qh.set(n.matches),s=()=>Cd.set(r.matches);i(),o(),a(),s(),t.addEventListener("change",i),e.addEventListener("change",o),n.addEventListener("change",a),r.addEventListener("change",s)},d1=sn([vc,nl],([t,e])=>t||e),ow=it(""),Ai=it(""),wa=(t=window.location.href)=>{const{origin:e,hash:n}=new URL(t),{pathname:r,searchParams:i}=new URL(`${e}${n.substring(1)}`);return{path:decodeURIComponent(r),params:Object.fromEntries(i)}},f1=(t,e)=>{if(!oe(mn)||!document.startViewTransition){e();return}const n={types:[t],update:async()=>{e(),await Rt(50),await new Promise(r=>{qu(()=>{r(void 0)})})}};try{document.startViewTransition(n)}catch{e()}},h1=(t,e,n)=>{const{isTrusted:r,oldURL:i,newURL:o}=t;if(!r){e();return}const a=wa(i).path,s=wa(o).path,l=n.test(a)&&n.test(s),u=a.split("/").length,d=s.split("/").length,f=l&&u>d?"backwards":l&&u<d?"forwards":"unknown";f1(f,()=>e())},Zt=async(t,{state:e={},replaceState:n=!1,notifyChange:r=!0,transitionType:i="unknown"}={})=>{const{origin:o,pathname:a,hash:s}=window.location,l=`${o}${a}${s}`,u=`${o}${a}#${t}`,d=[{...e,from:l},"",u];n?window.history.replaceState(...d):window.history.pushState(...d),r&&f1(i,()=>{window.dispatchEvent(new HashChangeEvent("hashchange",{oldURL:l,newURL:u}))})},qs=(t,e={})=>{const n="backwards";window.history.state?.from?f1(n,()=>{window.history.back()}):Zt(t,{...e,transitionType:n})},MN=()=>{const{display_url:t,_siteURL:e}=oe(Pt);window.open(t||e||"/","_blank")},_v=it({message:"",context:"authentication"}),Uu=it(!0),cu=it(!1),DN=()=>{_v.set({message:"",context:"authentication"})},sg=(t,e="authentication")=>{let n=t.cause?.message||oe(ce)("unexpected_error");t.name==="NotFoundError"&&(n=oe(ce)("sign_in_error.not_project_root")),t.name==="AbortError"&&(n=oe(ce)(oe(mc)==="local"?"sign_in_error.picker_dismissed":"sign_in_error.authentication_aborted")),_v.set({message:n,context:e}),console.error(t.name,t.message,t.cause)},FW=()=>{const{path:t}=wa(),{encodedData:e}=t.match(/^\/signin\/(?<encodedData>.+)/)?.groups??{};if(!e)return{_user:void 0,copiedPrefs:void 0};Zt("",{replaceState:!0});let n,r;try{const i=JSON.parse(atob(e));$t(i)&&typeof i.token=="string"&&(n={token:i.token},$t(i.prefs)&&(r=i.prefs))}catch{}return{_user:n,copiedPrefs:r}},zW=async()=>{const t=await Oi.get("sveltia-cms.user")||await Oi.get("decap-cms-user")||await Oi.get("netlify-cms-user");if($t(t)&&typeof t.backendName=="string")return t},jW=t=>{const e=t?.backendName==="local"||t?.backendName==="proxy"?"local":oe(Pt).backend.name;return mc.set(e),oe(Cn)},UW=async()=>{DN();let t,e;if({_user:t,copiedPrefs:e}=FW(),t??=await zW(),!t)return;const n=jW(t);if(t&&n){Un.set(t);const{token:r,refreshToken:i}=t;cu.set(!0);try{t=await n.signIn({token:r,refreshToken:i,auto:!0})}catch{t=void 0,Un.set(void 0)}}if(cu.set(!1),Uu.set(!t),!(!t||!n)){Un.set(t),e&&ht.update(r=>({...r,...e}));try{await n.fetchFiles()}catch(r){[401,403,404].includes(r.cause?.status)?Uu.set(!0):sg(r,"dataFetch")}}},B_=async(t,e)=>{DN(),mc.set(t);const n=oe(Cn);if(!n)return;let r;cu.set(!0);try{r=await n.signIn({token:e,auto:!1})}catch(i){cu.set(!1),Uu.set(!0),e&&i.cause?.status===401?sg(new Error("Invalid token",{cause:{message:oe(ce)("sign_in_error.invalid_token")}})):sg(i);return}if(cu.set(!1),Uu.set(!r),!!r){Un.set(r);try{await n.fetchFiles()}catch(i){sg(i,"dataFetch")}}},BW=async()=>{await oe(Cn)?.signOut(),await Oi.set("sveltia-cms.user",{}),mc.set(void 0),Un.set(void 0),Uu.set(!0),ad.set(!1);const t=oe(Pt)?.logout_redirect_url;t&&(window.location.href=t)};var qW=j('<div role="alert" class="message svelte-1ff54ya"> </div>'),HW=j('<div role="alert" class="svelte-1ff54ya"> </div>'),KW=j('<div role="alert" class="svelte-1ff54ya"><!></div>'),VW=j('<div role="none"><!></div>'),GW=j("<!> <!> <!>",1),WW=j("<!> <!> <!>",1),YW=j('<div role="alert" class="error svelte-1ff54ya"><!> </div>'),JW=j(" <!>",1),XW=j('<div role="none" class="buttons svelte-1ff54ya"><!> <!></div> <!>',1);const ZW={hash:"svelte-1ff54ya",code:".buttons.svelte-1ff54ya {display:flex;flex-direction:column;align-items:center;gap:12px;}.buttons.svelte-1ff54ya .button {width:320px;}[role=alert].svelte-1ff54ya {display:flex;align-items:center;gap:8px;}[role=alert].error.svelte-1ff54ya {color:var(--sui-error-foreground-color);}"};function QW(t,e){ae(e,!0),ke(t,ZW);const n=()=>H(Pt,"$cmsConfig",a),r=()=>H(ce,"$_",a),i=()=>H(cu,"$signingIn",a),o=()=>H(_v,"$signInError",a),[a,s]=ve();let l=ie(!1),u=ie(!1),d=ie(!1),f=ie(!1),h=ie("");const p=_(()=>n()?.backend?.name),g=_(()=>c(p)?Dh[c(p)]:null),m=_(()=>c(p)==="test-repo"),v=_(()=>c(m)?void 0:n()?.backend?.repo?.split("/").pop()),b=_(()=>c(l)&&!c(m)),y=({key:P,values:O,link:I})=>Qr.sanitize(r()(P,{values:O}).replace("<a>",`<a href="${I}" target="_blank">`),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target"]});Vt(()=>{const{hostname:P}=window.location;V(l,P==="127.0.0.1"||P==="localhost"||P.endsWith(".localhost"),!0),V(u,"showDirectoryPicker"in window),V(d,navigator.userAgentData?.brands.some(({brand:O})=>O==="Brave")??!1,!0),UW()});var w=XW(),x=M(w),E=F(x);{var $=P=>{var O=qW(),I=F(O);Z(L=>ne(I,L),[()=>r()("signing_in")]),S(P,O)},A=P=>{var O=X(),I=M(O);{var L=B=>{var K=HW(),G=F(K);Z(W=>ne(G,W),[()=>r()("config.error.unsupported_backend",{values:{name:c(p)}})]),S(B,K)},D=B=>{var K=WW(),G=M(K);{var W=J=>{var Q=GW(),ee=M(Q);{let ue=_(()=>r()("work_with_local_repo")),ge=_(()=>!c(u));et(ee,{variant:"primary",get label(){return c(ue)},get disabled(){return c(ge)},onclick:async()=>{await B_("local")}})}var re=z(ee,2);{var te=ue=>{var ge=KW(),ye=F(ge);{var me=Ce=>{var _e=X(),fe=M(_e);_r(fe,()=>y({key:"local_backend.disabled",link:"https://github.com/sveltia/sveltia-cms#enabling-local-development-in-brave"})),S(Ce,_e)},Ae=Ce=>{var _e=Fe();Z(fe=>ne(_e,fe),[()=>r()("local_backend.unsupported_browser")]),S(Ce,_e)};U(ye,Ce=>{c(d)?Ce(me):Ce(Ae,!1)})}S(ue,ge)},de=ue=>{var ge=X(),ye=M(ge);{var me=Ae=>{var Ce=VW(),_e=F(Ce);{var fe=Oe=>{var je=Fe();Z(Re=>ne(je,Re),[()=>r()("work_with_local_repo_description",{values:{repo:c(v)}})]),S(Oe,je)},be=Oe=>{var je=Fe();Z(Re=>ne(je,Re),[()=>r()("work_with_local_repo_description_no_repo")]),S(Oe,je)};U(_e,Oe=>{c(v)?Oe(fe):Oe(be,!1)})}S(Ae,Ce)};U(ye,Ae=>{o().message||Ae(me)},!0)}S(ue,ge)};U(re,ue=>{c(u)?ue(de,!1):ue(te)})}var he=z(re,2);_i(he,{}),S(J,Q)};U(G,J=>{c(b)&&J(W)})}var Y=z(G,2);{let J=_(()=>c(b)?"secondary":"primary"),Q=_(()=>c(m)?r()("work_with_test_repo"):r()("sign_in_with_x",{values:{service:c(g).label}}));et(Y,{get variant(){return c(J)},get label(){return c(Q)},onclick:async()=>{await B_(c(p))}})}var R=z(Y,2);{var q=J=>{{let Q=_(()=>r()("sign_in_with_x_using_pat",{values:{service:c(g).label}}));et(J,{variant:"secondary",get label(){return c(Q)},onclick:()=>{V(f,!0)}})}};U(R,J=>{c(m)||J(q)})}S(B,K)};U(I,B=>{c(g)?B(D,!1):B(L)},!0)}S(P,O)};U(E,P=>{i()?P($):P(A,!1)})}var k=z(E,2);{var T=P=>{var O=YW(),I=F(O);Qe(I,{name:"error"});var L=z(I);Z(()=>ne(L,` ${o().message??""}`)),S(P,O)};U(k,P=>{o().message&&o().context==="authentication"&&P(T)})}var C=z(x,2);{let P=_(()=>r()("sign_in_using_pat_title")),O=_(()=>({spellcheck:!1,"aria-label":r()("personal_access_token")})),I=_(()=>r()("sign_in")),L=_(()=>!c(h).trim());pL(C,{get title(){return c(P)},get textboxAttrs(){return c(O)},get okLabel(){return c(I)},get okDisabled(){return c(L)},onOk:async()=>{await B_(c(p),c(h).trim())},get open(){return c(f)},set open(D){V(f,D,!0)},get value(){return c(h)},set value(D){V(h,D,!0)},children:(D,B)=>{var K=JW(),G=M(K),W=z(G);{var Y=R=>{var q=X(),J=M(q);_r(J,()=>y({key:"sign_in_using_pat_link",values:{service:c(g).label},link:c(g).repository.newPatURL})),S(R,q)};U(W,R=>{c(g)?.repository?.newPatURL&&R(Y)})}Z(R=>ne(G,`${R??""} `),[()=>r()("sign_in_using_pat_description")]),S(D,K)},$$slots:{default:!0}})}S(t,w),se(),s()}const h$=(t,e=He)=>{var n=X(),r=M(n);_r(r,()=>Qr.sanitize(Ut.parseInline(e()),{ALLOWED_TAGS:["a","code"],ALLOWED_ATTR:["href"]})),S(t,n)};var eY=j('<img alt="" class="logo svelte-7ua6x9"/>'),tY=j("<li><!></li>"),nY=j('<div role="alert" class="message"><div role="none"> </div> <ul class="error svelte-7ua6x9"></ul></div>'),rY=j('<div role="alert" class="message"> </div>'),iY=j('<div role="alert" class="message"> </div>'),oY=j('<div role="alert"><div role="none" class="message"> </div> <div role="none" class="error svelte-7ua6x9"><!></div></div>'),aY=j('<div role="alert" class="message"> </div>'),sY=j('<div role="alert" class="message"> </div> <!>',1),lY=j('<div role="none" class="container svelte-7ua6x9"><div role="none" class="inner svelte-7ua6x9"><!> <h1 class="svelte-7ua6x9">Sveltia CMS</h1> <!></div></div>');const cY={hash:"svelte-7ua6x9",code:`.container.svelte-7ua6x9 {position:absolute;inset:0;z-index:101;flex:auto;display:flex;justify-content:center;align-items:center;gap:16px;padding:32px;transition:filter 250ms;}.container[inert].svelte-7ua6x9 {filter:opacity(0);}.container.svelte-7ua6x9 .inner:where(.svelte-7ua6x9) {display:flex;flex-direction:column;align-items:center;gap:32px;min-width:240px;max-width:800px;min-height:240px;}.container.svelte-7ua6x9 .logo:where(.svelte-7ua6x9) {max-width:160px;height:auto;}
|
|
474
|
+
}::selection {background-color:var(--sui-primary-accent-color-translucent);}* {-webkit-tap-highlight-color:transparent;}:focus {z-index:1;outline-width:0;}:focus-visible {outline-color:var(--sui-primary-accent-color-translucent);z-index:2;}h1 {margin:var(--sui-h1-margin, var(--sui-heading-margin));font-size:var(--sui-h1-font-size, 32px);font-family:var(--sui-h1-font-family, var(--sui-heading-font-family));font-weight:var(--sui-h1-font-weight, var(--sui-heading-font-weight));line-height:var(--sui-h1-line-height, var(--sui-heading-line-height));}h2 {margin:var(--sui-h2-margin, var(--sui-heading-margin));font-size:var(--sui-h2-font-size, 28px);font-family:var(--sui-h2-font-family, var(--sui-heading-font-family));font-weight:var(--sui-h2-font-weight, var(--sui-heading-font-weight));line-height:var(--sui-h2-line-height, var(--sui-heading-line-height));}h3 {margin:var(--sui-h3-margin, var(--sui-heading-margin));font-size:var(--sui-h3-font-size, 24px);font-family:var(--sui-h3-font-family, var(--sui-heading-font-family));font-weight:var(--sui-h3-font-weight, var(--sui-heading-font-weight));line-height:var(--sui-h3-line-height, var(--sui-heading-line-height));}h4 {margin:var(--sui-h4-margin, var(--sui-heading-margin));font-size:var(--sui-h4-font-size, 20px);font-family:var(--sui-h4-font-family, var(--sui-heading-font-family));font-weight:var(--sui-h4-font-weight, var(--sui-heading-font-weight));line-height:var(--sui-h4-line-height, var(--sui-heading-line-height));}h5 {margin:var(--sui-h5-margin, var(--sui-heading-margin));font-size:var(--sui-h5-font-size, 16px);font-family:var(--sui-h5-font-family, var(--sui-heading-font-family));font-weight:var(--sui-h5-font-weight, var(--sui-heading-font-weight));line-height:var(--sui-h5-line-height, var(--sui-heading-line-height));}h6 {margin:var(--sui-h6-margin, var(--sui-heading-margin));font-size:var(--sui-h6-font-size, 12px);font-family:var(--sui-h6-font-family, var(--sui-heading-font-family));font-weight:var(--sui-h6-font-weight, var(--sui-heading-font-weight));line-height:var(--sui-h6-line-height, var(--sui-heading-line-height));}strong {font-weight:var(--sui-font-weight-bold, bold);}a {color:var(--sui-primary-accent-color-text);text-decoration:none;text-underline-offset:2px;}a:is(:hover, :focus, :active) {text-decoration:underline;}:is(:root, :host)[data-underline-links=true].svelte-nj5xzu a {text-decoration:underline;}:is(p, ul, ol, dl) {margin:var(--sui-paragraph-margin) 0;line-height:var(--sui-line-height-comfortable);}:is(ul, ol) {padding-inline:2em;}:is(code, pre) {border-radius:4px;background-color:var(--sui-code-background-color);font-family:var(--sui-font-family-monospace);font-size:var(--sui-font-size-monospace);vertical-align:-0.05em;}pre {padding:8px;line-height:var(--sui-line-height-compact);-webkit-user-select:text;user-select:text;}code {padding:2px 4px;}table {border-collapse:collapse;}:is(th, td) {border:1px solid var(--sui-textbox-border-color);padding:8px;}blockquote {margin-inline:16px 0;border-inline-start:4px solid var(--sui-textbox-border-color);padding-inline-start:12px;}:is(.disabled, .readonly, [aria-disabled=true], [aria-readonly=true], [inert]):not(body) {cursor:default;pointer-events:none;-webkit-user-select:none;user-select:none;filter:grayscale(1) opacity(0.35);}:is(.disabled, .readonly, [aria-disabled=true], [aria-readonly=true], [inert]):not(body) * {filter:grayscale(0) opacity(1);}:is(.disabled, .readonly, [aria-disabled=true], [aria-readonly=true], [inert]) * {cursor:default;pointer-events:none;-webkit-user-select:none;user-select:none;}.font-loader.svelte-nj5xzu {position:absolute;inset-inline-start:-99999px;font-family:var(--sui-font-family-default);}.app-shell.svelte-nj5xzu {position:fixed;inset:0;overflow:hidden;width:100%;height:100%;color:var(--sui-primary-foreground-color);background-color:var(--sui-primary-background-color);font-family:var(--sui-font-family-default);font-size:var(--sui-font-size-default);font-weight:var(--sui-font-weight-normal, normal);word-spacing:var(--sui-word-spacing-normal);-webkit-user-select:none;user-select:none;touch-action:none;cursor:default;}.app-shell.horizontal.svelte-nj5xzu {display:flex;flex-direction:row;overflow:hidden;}.app-shell.vertical.svelte-nj5xzu {display:flex;flex-direction:column;overflow:hidden;}`};function AW(t,e){ae(e,!0),ke(t,$W);let n=N(e,"orientation",3,"horizontal"),r=ot(e,["$$slots","$$events","$$legacy","orientation","children"]);const i=["https://fonts.googleapis.com/css2?family=Merriweather+Sans:ital,wght@0,300..800;1,300..800&family=Noto+Sans+Mono:wght@100..900&display=swap","https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=block"];let o=ie(void 0);Vt(()=>{const p=globalThis.matchMedia("(prefers-color-scheme: dark)"),{dataset:g}=document.documentElement,m=()=>{g.autoTheming!=="false"&&(g.theme=p.matches?"dark":"light")};m(),p.onchange=()=>{m()},globalThis.setTimeout(()=>{c(o)?.remove()},1e3)});var a=TW();_C("nj5xzu",p=>{var g=EW(),m=M(g),v=z(m,8);rt(v,17,()=>i,yr,(b,y)=>{var w=SW(),x=M(w),E=z(x,2);Z(()=>{Se(x,"href",c(y)),Se(E,"href",c(y))}),S(b,w)}),Z(b=>Se(m,"content",b),[()=>["width=device-width","initial-scale=1","maximum-scale=1","interactive-widget=resizes-content"].join(", ")]),S(p,g)});var s=M(a);Co(s,"",{},{opacity:"0"}),St(s,p=>V(o,p),()=>c(o));var l=z(s,2),u=p=>p.preventDefault(),d=p=>p.preventDefault(),f=p=>{if(document.documentElement.matches('[data-env="dev"]'))return;const g=p.target;document.documentElement.matches('[data-env="dev"]')||g?.matches("input, textarea")&&"maxLength"in g||g?.closest('[role="textbox"]')?.contentEditable==="true"||p.preventDefault()};mt(l,()=>({...r,role:"none",class:`sui app-shell ${n()??""}`,ondragover:u,ondrop:d,oncontextmenu:f}),void 0,void 0,void 0,"svelte-nj5xzu");var h=F(l);Ue(h,()=>e.children??He),S(t,a),se()}var CW=j('<div role="none" class="sui empty-state svelte-1nscthp"><!></div>');const PW={hash:"svelte-1nscthp",code:".empty-state.svelte-1nscthp {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding:16px;width:100%;height:100%;text-align:center;}"};function cr(t,e){ke(t,PW);let n=N(e,"children",3,void 0);var r=CW(),i=F(r);Ue(i,()=>n()??He),S(t,r)}var OW=j('<div><div role="none" class="inner svelte-rpbb8n"><!></div></div>');const LW={hash:"svelte-rpbb8n",code:".inner.svelte-rpbb8n {display:contents;}"};function ma(t,e){ke(t,LW);let n=N(e,"hidden",3,!1),r=N(e,"disabled",3,!1),i=ot(e,["$$slots","$$events","$$legacy","class","hidden","disabled","children"]);var o=OW();mt(o,()=>({...i,role:"group",class:`sui group ${e.class??""}`,hidden:n(),"aria-hidden":n(),"aria-disabled":r()}),void 0,void 0,void 0,"svelte-rpbb8n");var a=F(o),s=F(a);Ue(s,()=>e.children??He),Z(()=>a.inert=r()),S(t,o)}sL();const RN='<svg viewBox="0 0 800 800" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientUnits="userSpaceOnUse" x1="400" x2="400" y1="0" y2="800"><stop offset="0" stop-color="#f0980b"/><stop offset="1" stop-color="#ff1d00"/></linearGradient><clipPath id="b"><rect height="800" rx="80" width="800"/></clipPath><rect fill="url(#a)" height="800" rx="80" width="800"/><g style="clip-path:url(#b);fill:none;stroke:#fff;stroke-linecap:round;stroke-linejoin:round;stroke-width:180"><path d="m320-80-200 320 200 320-200 320"/><path d="m400 240 200 320 200-320"/></g></svg>',IW=(t,{field:e,pattern:n}={field:"",pattern:""})=>{if(!e)return t;if(e==="fileType")return t.filter(({path:i})=>sd(i)===n);const r=fd(n);return t.filter(i=>{const o=i[e];return r?r.test(String(o??"")):o===n})},NW=(t,{field:e,pattern:n}={field:"",pattern:void 0})=>{if(!e)return t.length?{"*":t}:{};const r=fd(n),i={},o=oe(ce)("other");return t.forEach(a=>{const s=a[e];let l;r?[l=o]=String(s??"").match(r)??[]:l=s,l in i||(i[l]=[]),i[l].push(a)}),Object.fromEntries(Object.entries(i).sort(([a],[s])=>eo(a,s)))},f$=(t,e)=>{const{commitAuthor:{name:n,login:r,email:i}={},commitDate:o}=t;return e==="commit_author"?n||r||i:e==="commit_date"?o:e==="name"?t.name.split(".")[0]:t[e]??""},RW=(t,{key:e,order:n}={})=>{if(!e||!n)return t;const r=[...t],i={commit_author:String,commit_date:Date}[e]||r[0]?.[e]?.constructor||String;return r.sort((o,a)=>{const s=f$(o,e),l=f$(a,e);return i===String?eo(s,l):i===Date?Number(s)-Number(l):s-l}),n==="descending"&&r.reverse(),r},nl=it(!1),vs=it(!1),MW=sn([Oo],([t],e)=>{e(!!t.files.length)}),vv=({collectionName:t,fileName:e,internalPath:n})=>{if(t===void 0)return oe(ce)(n===void 0?"all_assets":"global_assets");const r=ki(t),i=r?Za(r):t;if(!e)return i;const o=r?pd(r,e):void 0,a=o?Fh(o):e;return`${i} › ${a}`},_s=it({type:"grid",showInfo:!0}),kc=sn([Wn,Po],([t,e],n)=>{t&&e&&e.internalPath!==void 0?n(t.filter(({folder:r})=>fn(r,e))):n(t?[...t]:[])}),u1=sn([kc,_s],([t,e],n)=>{let r=[...t];r=RW(r,e.sort),r=IW(r,e.filter);const i=NW(r,e.group);fn(oe(u1),i)||n(i)});kc.subscribe(t=>{Zf.set([]),oe(ht).devModeEnabled&&console.info("listedAssets",t)});const mn=it(!1),Ta=it(!1),Qh=it(!1),Cd=it(!0),DW=()=>{const t=globalThis.matchMedia("(width < 768px)"),e=globalThis.matchMedia("(768px <= width < 1024px)"),n=globalThis.matchMedia("(1024px <= width)"),r=globalThis.matchMedia("(pointer: fine)"),i=()=>mn.set(t.matches),o=()=>Ta.set(e.matches),a=()=>Qh.set(n.matches),s=()=>Cd.set(r.matches);i(),o(),a(),s(),t.addEventListener("change",i),e.addEventListener("change",o),n.addEventListener("change",a),r.addEventListener("change",s)},d1=sn([vc,nl],([t,e])=>t||e),ow=it(""),Ai=it(""),wa=(t=window.location.href)=>{const{origin:e,hash:n}=new URL(t),{pathname:r,searchParams:i}=new URL(`${e}${n.substring(1)}`);return{path:decodeURIComponent(r),params:Object.fromEntries(i)}},f1=(t,e)=>{if(!oe(mn)||!document.startViewTransition){e();return}const n={types:[t],update:async()=>{e(),await Rt(50),await new Promise(r=>{qu(()=>{r(void 0)})})}};try{document.startViewTransition(n)}catch{e()}},h1=(t,e,n)=>{const{isTrusted:r,oldURL:i,newURL:o}=t;if(!r){e();return}const a=wa(i).path,s=wa(o).path,l=n.test(a)&&n.test(s),u=a.split("/").length,d=s.split("/").length,f=l&&u>d?"backwards":l&&u<d?"forwards":"unknown";f1(f,()=>e())},Zt=async(t,{state:e={},replaceState:n=!1,notifyChange:r=!0,transitionType:i="unknown"}={})=>{const{origin:o,pathname:a,hash:s}=window.location,l=`${o}${a}${s}`,u=`${o}${a}#${t}`,d=[{...e,from:l},"",u];n?window.history.replaceState(...d):window.history.pushState(...d),r&&f1(i,()=>{window.dispatchEvent(new HashChangeEvent("hashchange",{oldURL:l,newURL:u}))})},qs=(t,e={})=>{const n="backwards";window.history.state?.from?f1(n,()=>{window.history.back()}):Zt(t,{...e,transitionType:n})},MN=()=>{const{display_url:t,_siteURL:e}=oe(Pt);window.open(t||e||"/","_blank")},_v=it({message:"",context:"authentication"}),Uu=it(!0),cu=it(!1),DN=()=>{_v.set({message:"",context:"authentication"})},sg=(t,e="authentication")=>{let n=t.cause?.message||oe(ce)("unexpected_error");t.name==="NotFoundError"&&(n=oe(ce)("sign_in_error.not_project_root")),t.name==="AbortError"&&(n=oe(ce)(oe(mc)==="local"?"sign_in_error.picker_dismissed":"sign_in_error.authentication_aborted")),_v.set({message:n,context:e}),console.error(t.name,t.message,t.cause)},FW=()=>{const{path:t}=wa(),{encodedData:e}=t.match(/^\/signin\/(?<encodedData>.+)/)?.groups??{};if(!e)return{_user:void 0,copiedPrefs:void 0};Zt("",{replaceState:!0});let n,r;try{const i=JSON.parse(atob(e));$t(i)&&typeof i.token=="string"&&(n={token:i.token},$t(i.prefs)&&(r=i.prefs))}catch{}return{_user:n,copiedPrefs:r}},zW=async()=>{const t=await Oi.get("sveltia-cms.user")||await Oi.get("decap-cms-user")||await Oi.get("netlify-cms-user");if($t(t)&&typeof t.backendName=="string")return t},jW=t=>{const e=t?.backendName==="local"||t?.backendName==="proxy"?"local":oe(Pt).backend.name;return mc.set(e),oe(Cn)},UW=async()=>{DN();let t,e;if({_user:t,copiedPrefs:e}=FW(),t??=await zW(),!t)return;const n=jW(t);if(t&&n){Un.set(t);const{token:r,refreshToken:i}=t;cu.set(!0);try{t=await n.signIn({token:r,refreshToken:i,auto:!0})}catch{t=void 0,Un.set(void 0)}}if(cu.set(!1),Uu.set(!t),!(!t||!n)){Un.set(t),e&&ht.update(r=>({...r,...e}));try{await n.fetchFiles()}catch(r){[401,403,404].includes(r.cause?.status)?Uu.set(!0):sg(r,"dataFetch")}}},B_=async(t,e)=>{DN(),mc.set(t);const n=oe(Cn);if(!n)return;let r;cu.set(!0);try{r=await n.signIn({token:e,auto:!1})}catch(i){cu.set(!1),Uu.set(!0),e&&i.cause?.status===401?sg(new Error("Invalid token",{cause:{message:oe(ce)("sign_in_error.invalid_token")}})):sg(i);return}if(cu.set(!1),Uu.set(!r),!!r){Un.set(r);try{await n.fetchFiles()}catch(i){sg(i,"dataFetch")}}},BW=async()=>{await oe(Cn)?.signOut(),await Oi.set("sveltia-cms.user",{}),mc.set(void 0),Un.set(void 0),Uu.set(!0),ad.set(!1);const t=oe(Pt)?.logout_redirect_url;t&&(window.location.href=t)};var qW=j('<div role="alert" class="message svelte-1ff54ya"> </div>'),HW=j('<div role="alert" class="svelte-1ff54ya"> </div>'),KW=j('<div role="alert" class="svelte-1ff54ya"><!></div>'),VW=j('<div role="none"><!></div>'),GW=j("<!> <!> <!>",1),WW=j("<!> <!> <!>",1),YW=j('<div role="alert" class="error svelte-1ff54ya"><!> </div>'),JW=j(" <!>",1),XW=j('<div role="none" class="buttons svelte-1ff54ya"><!> <!></div> <!>',1);const ZW={hash:"svelte-1ff54ya",code:".buttons.svelte-1ff54ya {display:flex;flex-direction:column;align-items:center;gap:12px;}.buttons.svelte-1ff54ya .button {width:320px;}[role=alert].svelte-1ff54ya {display:flex;align-items:center;gap:8px;}[role=alert].error.svelte-1ff54ya {color:var(--sui-error-foreground-color);}"};function QW(t,e){ae(e,!0),ke(t,ZW);const n=()=>H(Pt,"$cmsConfig",a),r=()=>H(ce,"$_",a),i=()=>H(cu,"$signingIn",a),o=()=>H(_v,"$signInError",a),[a,s]=ve();let l=ie(!1),u=ie(!1),d=ie(!1),f=ie(!1),h=ie("");const p=_(()=>n()?.backend?.name),g=_(()=>c(p)?Dh[c(p)]:null),m=_(()=>c(p)==="test-repo"),v=_(()=>c(m)?void 0:n()?.backend?.repo?.split("/").pop()),b=_(()=>c(l)&&!c(m)),y=({key:P,values:O,link:I})=>Qr.sanitize(r()(P,{values:O}).replace("<a>",`<a href="${I}" target="_blank">`),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target"]});Vt(()=>{const{hostname:P}=window.location;V(l,P==="127.0.0.1"||P==="localhost"||P.endsWith(".localhost"),!0),V(u,"showDirectoryPicker"in window),V(d,navigator.userAgentData?.brands.some(({brand:O})=>O==="Brave")??!1,!0),UW()});var w=XW(),x=M(w),E=F(x);{var $=P=>{var O=qW(),I=F(O);Z(L=>ne(I,L),[()=>r()("signing_in")]),S(P,O)},A=P=>{var O=X(),I=M(O);{var L=B=>{var K=HW(),G=F(K);Z(W=>ne(G,W),[()=>r()("config.error.unsupported_backend",{values:{name:c(p)}})]),S(B,K)},D=B=>{var K=WW(),G=M(K);{var W=J=>{var Q=GW(),ee=M(Q);{let ue=_(()=>r()("work_with_local_repo")),ge=_(()=>!c(u));et(ee,{variant:"primary",get label(){return c(ue)},get disabled(){return c(ge)},onclick:async()=>{await B_("local")}})}var re=z(ee,2);{var te=ue=>{var ge=KW(),ye=F(ge);{var me=Ce=>{var _e=X(),fe=M(_e);_r(fe,()=>y({key:"local_backend.disabled",link:"https://github.com/sveltia/sveltia-cms#enabling-local-development-in-brave"})),S(Ce,_e)},Ae=Ce=>{var _e=Fe();Z(fe=>ne(_e,fe),[()=>r()("local_backend.unsupported_browser")]),S(Ce,_e)};U(ye,Ce=>{c(d)?Ce(me):Ce(Ae,!1)})}S(ue,ge)},de=ue=>{var ge=X(),ye=M(ge);{var me=Ae=>{var Ce=VW(),_e=F(Ce);{var fe=Oe=>{var je=Fe();Z(Re=>ne(je,Re),[()=>r()("work_with_local_repo_description",{values:{repo:c(v)}})]),S(Oe,je)},be=Oe=>{var je=Fe();Z(Re=>ne(je,Re),[()=>r()("work_with_local_repo_description_no_repo")]),S(Oe,je)};U(_e,Oe=>{c(v)?Oe(fe):Oe(be,!1)})}S(Ae,Ce)};U(ye,Ae=>{o().message||Ae(me)},!0)}S(ue,ge)};U(re,ue=>{c(u)?ue(de,!1):ue(te)})}var he=z(re,2);_i(he,{}),S(J,Q)};U(G,J=>{c(b)&&J(W)})}var Y=z(G,2);{let J=_(()=>c(b)?"secondary":"primary"),Q=_(()=>c(m)?r()("work_with_test_repo"):r()("sign_in_with_x",{values:{service:c(g).label}}));et(Y,{get variant(){return c(J)},get label(){return c(Q)},onclick:async()=>{await B_(c(p))}})}var R=z(Y,2);{var q=J=>{{let Q=_(()=>r()("sign_in_with_x_using_pat",{values:{service:c(g).label}}));et(J,{variant:"secondary",get label(){return c(Q)},onclick:()=>{V(f,!0)}})}};U(R,J=>{c(m)||J(q)})}S(B,K)};U(I,B=>{c(g)?B(D,!1):B(L)},!0)}S(P,O)};U(E,P=>{i()?P($):P(A,!1)})}var k=z(E,2);{var T=P=>{var O=YW(),I=F(O);Qe(I,{name:"error"});var L=z(I);Z(()=>ne(L,` ${o().message??""}`)),S(P,O)};U(k,P=>{o().message&&o().context==="authentication"&&P(T)})}var C=z(x,2);{let P=_(()=>r()("sign_in_using_pat_title")),O=_(()=>({spellcheck:!1,"aria-label":r()("personal_access_token")})),I=_(()=>r()("sign_in")),L=_(()=>!c(h).trim());pL(C,{get title(){return c(P)},get textboxAttrs(){return c(O)},get okLabel(){return c(I)},get okDisabled(){return c(L)},onOk:async()=>{await B_(c(p),c(h).trim())},get open(){return c(f)},set open(D){V(f,D,!0)},get value(){return c(h)},set value(D){V(h,D,!0)},children:(D,B)=>{var K=JW(),G=M(K),W=z(G);{var Y=R=>{var q=X(),J=M(q);_r(J,()=>y({key:"sign_in_using_pat_link",values:{service:c(g).label},link:c(g).repository.newPatURL})),S(R,q)};U(W,R=>{c(g)?.repository?.newPatURL&&R(Y)})}Z(R=>ne(G,`${R??""} `),[()=>r()("sign_in_using_pat_description")]),S(D,K)},$$slots:{default:!0}})}S(t,w),se(),s()}const h$=(t,e=He)=>{var n=X(),r=M(n);_r(r,()=>Qr.sanitize(Ut.parseInline(e()),{ALLOWED_TAGS:["a","code"],ALLOWED_ATTR:["href"]})),S(t,n)};var eY=j('<img alt="" class="logo svelte-7ua6x9"/>'),tY=j("<li><!></li>"),nY=j('<div role="alert" class="message"><div role="none"> </div> <ul class="error svelte-7ua6x9"></ul></div>'),rY=j('<div role="alert" class="message"> </div>'),iY=j('<div role="alert" class="message"> </div>'),oY=j('<div role="alert"><div role="none" class="message"> </div> <div role="none" class="error svelte-7ua6x9"><!></div></div>'),aY=j('<div role="alert" class="message"> </div>'),sY=j('<div role="alert" class="message"> </div> <!>',1),lY=j('<div role="none" class="container svelte-7ua6x9"><div role="none" class="inner svelte-7ua6x9"><!> <h1 class="svelte-7ua6x9">Sveltia CMS</h1> <!></div></div>');const cY={hash:"svelte-7ua6x9",code:`.container.svelte-7ua6x9 {position:absolute;inset:0;z-index:101;flex:auto;display:flex;justify-content:center;align-items:center;gap:16px;padding:32px;transition:filter 250ms;}.container[inert].svelte-7ua6x9 {filter:opacity(0);}.container.svelte-7ua6x9 .inner:where(.svelte-7ua6x9) {display:flex;flex-direction:column;align-items:center;gap:32px;min-width:240px;max-width:800px;min-height:240px;}.container.svelte-7ua6x9 .logo:where(.svelte-7ua6x9) {max-width:160px;height:auto;}
|
|
475
475
|
@media (width < 768px) {.container.svelte-7ua6x9 .logo:where(.svelte-7ua6x9) {max-width:120px;}
|
|
476
|
-
}.container.svelte-7ua6x9 h1:where(.svelte-7ua6x9) {font-size:48px;}.container.svelte-7ua6x9 .logo:where(.svelte-7ua6x9) ~ h1:where(.svelte-7ua6x9) {font-size:var(--sui-font-size-xxx-large);}.container.svelte-7ua6x9 .error:where(.svelte-7ua6x9) {border-radius:var(--sui-control-medium-border-radius);padding:12px;background-color:var(--sui-tertiary-background-color);font-size:var(--sui-font-size-default);text-align:center;-webkit-user-select:text;user-select:text;cursor:text;}.container.svelte-7ua6x9 .message {margin:0 0 16px;font-size:var(--sui-font-size-large);font-weight:var(--sui-font-weight-normal);text-align:center;}.container.svelte-7ua6x9 .message ul {margin:12px 0 0;padding:0;max-height:160px;overflow-y:auto;list-style:none;}.container.svelte-7ua6x9 .message li {margin:12px;padding:0;}`};function uY(t,e){ae(e,!0),ke(t,cY);const n=()=>H(ce,"$_",p),r=()=>H(Un,"$user",p),i=()=>H(ad,"$dataLoaded",p),o=()=>H(Pt,"$cmsConfig",p),a=()=>H(gy,"$cmsConfigErrors",p),s=()=>H(hy,"$prefsError",p),l=()=>H(ht,"$prefs",p),u=()=>H(_v,"$signInError",p),d=()=>H(RO,"$inAuthPopup",p),f=()=>H(Uu,"$unauthenticated",p),h=()=>H(fa,"$dataLoadedProgress",p),[p,g]=ve();ze(()=>{Je(Ai,n()("welcome_to_sveltia_cms"))});var m=lY(),v=F(m),b=F(v);{var y=$=>{const A=_(()=>o()?.logo?.src??o()?.logo_url);var k=eY();Z(T=>Se(k,"src",T),[()=>c(A)||`data:image/svg+xml;base64,${btoa(RN)}`]),S($,k)};U(b,$=>{(o()||a().length)&&$(y)})}var w=z(b,4);{var x=$=>{var A=nY(),k=F(A),T=F(k),C=z(k,2);rt(C,5,a,yr,(P,O)=>{var I=tY(),L=F(I);h$(L,()=>c(O)),S(P,I)}),Z(P=>ne(T,P),[()=>n()(a().length===1?"config.one_error":"config.many_errors")]),S($,A)},E=$=>{var A=X(),k=M(A);{var T=P=>{var O=rY(),I=F(O);Z(L=>ne(I,L),[()=>n()(`prefs.error.${s().type}`)]),S(P,O)},C=P=>{var O=X(),I=M(O);{var L=B=>{var K=iY(),G=F(K);Z(W=>ne(G,W),[()=>n()("loading_cms_config")]),S(B,K)},D=B=>{var K=X(),G=M(K);{var W=R=>{var q=oY(),J=F(q),Q=F(J),ee=z(J,2),re=F(ee);h$(re,()=>u().message),Z(te=>ne(Q,te),[()=>n()("loading_site_data_error")]),S(R,q)},Y=R=>{var q=X(),J=M(q);{var Q=re=>{var te=aY(),de=F(te);Z(he=>ne(de,he),[()=>n()("authorizing")]),S(re,te)},ee=re=>{var te=X(),de=M(te);{var he=ge=>{QW(ge,{})},ue=ge=>{var ye=X(),me=M(ye);{var Ae=Ce=>{var _e=sY(),fe=M(_e),be=F(fe),Oe=z(fe,2);{var je=Re=>{
|
|
476
|
+
}.container.svelte-7ua6x9 h1:where(.svelte-7ua6x9) {font-size:48px;}.container.svelte-7ua6x9 .logo:where(.svelte-7ua6x9) ~ h1:where(.svelte-7ua6x9) {font-size:var(--sui-font-size-xxx-large);}.container.svelte-7ua6x9 .error:where(.svelte-7ua6x9) {border-radius:var(--sui-control-medium-border-radius);padding:12px;background-color:var(--sui-tertiary-background-color);font-size:var(--sui-font-size-default);text-align:center;-webkit-user-select:text;user-select:text;cursor:text;}.container.svelte-7ua6x9 .message {margin:0 0 16px;font-size:var(--sui-font-size-large);font-weight:var(--sui-font-weight-normal);text-align:center;}.container.svelte-7ua6x9 .message ul {margin:12px 0 0;padding:0;max-height:160px;overflow-y:auto;list-style:none;}.container.svelte-7ua6x9 .message li {margin:12px;padding:0;}`};function uY(t,e){ae(e,!0),ke(t,cY);const n=()=>H(ce,"$_",p),r=()=>H(Un,"$user",p),i=()=>H(ad,"$dataLoaded",p),o=()=>H(Pt,"$cmsConfig",p),a=()=>H(gy,"$cmsConfigErrors",p),s=()=>H(hy,"$prefsError",p),l=()=>H(ht,"$prefs",p),u=()=>H(_v,"$signInError",p),d=()=>H(RO,"$inAuthPopup",p),f=()=>H(Uu,"$unauthenticated",p),h=()=>H(fa,"$dataLoadedProgress",p),[p,g]=ve();ze(()=>{Je(Ai,n()("welcome_to_sveltia_cms"))});var m=lY(),v=F(m),b=F(v);{var y=$=>{const A=_(()=>o()?.logo?.src??o()?.logo_url);var k=eY();Z(T=>Se(k,"src",T),[()=>c(A)||`data:image/svg+xml;base64,${btoa(RN)}`]),S($,k)};U(b,$=>{(o()||a().length)&&$(y)})}var w=z(b,4);{var x=$=>{var A=nY(),k=F(A),T=F(k),C=z(k,2);rt(C,5,a,yr,(P,O)=>{var I=tY(),L=F(I);h$(L,()=>c(O)),S(P,I)}),Z(P=>ne(T,P),[()=>n()(a().length===1?"config.one_error":"config.many_errors")]),S($,A)},E=$=>{var A=X(),k=M(A);{var T=P=>{var O=rY(),I=F(O);Z(L=>ne(I,L),[()=>n()(`prefs.error.${s().type}`)]),S(P,O)},C=P=>{var O=X(),I=M(O);{var L=B=>{var K=iY(),G=F(K);Z(W=>ne(G,W),[()=>n()("loading_cms_config")]),S(B,K)},D=B=>{var K=X(),G=M(K);{var W=R=>{var q=oY(),J=F(q),Q=F(J),ee=z(J,2),re=F(ee);h$(re,()=>u().message),Z(te=>ne(Q,te),[()=>n()("loading_site_data_error")]),S(R,q)},Y=R=>{var q=X(),J=M(q);{var Q=re=>{var te=aY(),de=F(te);Z(he=>ne(de,he),[()=>n()("authorizing")]),S(re,te)},ee=re=>{var te=X(),de=M(te);{var he=ge=>{QW(ge,{})},ue=ge=>{var ye=X(),me=M(ye);{var Ae=Ce=>{var _e=sY(),fe=M(_e),be=F(fe),Oe=z(fe,2);{var je=Re=>{eK(Re,{get now(){return h()}})};U(Oe,Re=>{h()!==void 0&&Re(je)})}Z(Re=>ne(be,Re),[()=>n()("loading_site_data")]),S(Ce,_e)};U(me,Ce=>{i()||Ce(Ae)},!0)}S(ge,ye)};U(de,ge=>{!r()||f()?ge(he):ge(ue,!1)},!0)}S(re,te)};U(J,re=>{d()?re(Q):re(ee,!1)},!0)}S(R,q)};U(G,R=>{u().message&&u().context==="dataFetch"?R(W):R(Y,!1)},!0)}S(B,K)};U(I,B=>{!o()||!l()?B(L):B(D,!1)},!0)}S(P,O)};U(k,P=>{s()?P(T):P(C,!1)},!0)}S($,A)};U(w,$=>{a().length?$(x):$(E,!1)})}Z(()=>m.inert=r()&&i()),S(t,m),se(),g()}var dY=j(" <!>",1),fY=j('<svelte-css-wrapper style="display: contents"><!></svelte-css-wrapper>',1);function hY(t,e){ae(e,!0);const n=()=>H(Cn,"$backend",o),r=()=>H(Pt,"$cmsConfig",o),i=()=>H(ce,"$_",o),[o,a]=ve(),s=300*1e3;let l=0,u=ie(!1),d=ie("none");const f=async()=>{n()?.checkStatus&&V(d,await n().checkStatus(),!0)},h=()=>{f(),l=window.setInterval(()=>{f()},s)},p=()=>{window.clearInterval(l),V(d,"none")},g=()=>{c(u)&&(n()?.checkStatus&&!n().repository?.isSelfHosted?h():p())};Vt(()=>(V(u,!0),()=>{p()})),ze(()=>{c(u),n(),r(),g()});var m=X(),v=M(m);{var b=y=>{var w=fY(),x=M(w);{let E=_(()=>c(d)==="major"?"error":"warning");Vu(x,()=>({"--sui-infobar-message-justify-content":"center"})),Jm(x.lastChild,{get status(){return c(E)},children:($,A)=>{var k=dY(),T=M(k),C=z(T);{let P=_(()=>i()("details"));et(C,{variant:"link",get label(){return c(P)},onclick:()=>{window.open(n()?.statusDashboardURL,"_blank")}})}Z(P=>ne(T,`${P??""} `),[()=>i()(`backend_status.${c(d)}_incident`,{values:{service:n()?.label}})]),S($,k)},$$slots:{default:!0}})}S(y,w)};U(v,y=>{["minor","major"].includes(c(d))&&y(b)})}S(t,m),se(),a()}var pY=j(" <!>",1),gY=j('<svelte-css-wrapper style="display: contents"><!></svelte-css-wrapper>',1);function mY(t,e){ae(e,!0);const n=()=>H(ce,"$_",r),[r,i]=ve(),o=3600*1e3,a=600*1e3;let s=0,l=0,u=ie(!1);const d=async()=>{try{const g=await fetch("https://unpkg.com/@sveltia/cms/package.json");if(!g.ok)return;const{version:m}=await g.json();m&&m!==Qb&&(l=window.setTimeout(()=>{V(u,!0)},a))}catch{}};Vt(()=>{if(document.querySelector('script[src^="https://unpkg.com/@sveltia/cms"]'))return d(),s=window.setInterval(()=>{d()},o),()=>{window.clearInterval(s),window.clearTimeout(l)}});var f=X(),h=M(f);{var p=g=>{var m=gY(),v=M(m);Vu(v,()=>({"--sui-infobar-message-justify-content":"center"})),Jm(v.lastChild,{children:(b,y)=>{var w=pY(),x=M(w),E=z(x);{let $=_(()=>n()("update_now"));et(E,{variant:"link",get label(){return c($)},onclick:()=>{window.location.reload()}})}Z($=>ne(x,`${$??""} `),[()=>n()("update_available")]),S(b,w)},$$slots:{default:!0}}),S(g,m)};U(h,g=>{c(u)&&g(p)})}S(t,f),se(),i()}var vY=j("<!> <!> <!>",1),_Y=j("<!> <!>",1);function FN(t,e){ae(e,!0);const n=()=>H(ce,"$_",r),[r,i]=ve(),o=k=>{var T=vY(),C=M(T);{let I=_(()=>c(f)?n()("public_url"):n()("public_urls")),L=_(()=>!c(h).length);vt(C,{get label(){return c(I)},get disabled(){return c(L)},onclick:()=>{y(m,n()("asset_url_copied"),n()("asset_urls_copied"))}})}var P=z(C,2);{let I=_(()=>c(f)?n()("file_path"):n()("file_paths"));vt(P,{get label(){return c(I)},onclick:()=>{y(v,n()("asset_path_copied"),n()("asset_paths_copied"))}})}var O=z(P,2);{let I=_(()=>n()("file_data")),L=_(()=>!c(u));vt(O,{get label(){return c(I)},get disabled(){return c(L)},onclick:()=>{y(b,n()("asset_data_copied"),n()("asset_data_copied"))}})}S(k,T)};let a=N(e,"assets",19,()=>[]),s=N(e,"useButton",3,!0),l=ie(At([])),u=ie(!1);const d=At({show:!1,text:"",status:"success"}),f=_(()=>a().length===1),h=_(()=>c(l).filter(({publicURL:k})=>!!k).map(({publicURL:k})=>k));let p;const g=async()=>{if(p=void 0,!c(f))return!1;const k=await ss(a()[0]),{type:T}=k;return p=k,Hf(T)?!0:sa.includes(T)?typeof navigator.clipboard.write=="function":!1},m=async()=>{await navigator.clipboard.writeText(c(h).join(`
|
|
477
477
|
`))},v=async()=>{await navigator.clipboard.writeText(a().map(({path:k})=>`/${k}`).join(`
|
|
478
478
|
`))},b=async()=>{let k=p;const{type:T}=k;if(Hf(T)){await navigator.clipboard.writeText(await k.text());return}if(!sa.includes(T))throw new Error("Unsupported type");T!=="image/png"&&(k=await Ix(k)),await navigator.clipboard.write([new ClipboardItem({"image/png":k})])},y=async(k,T,C)=>{try{await k(),d.status="success",d.text=c(f)?T:C}catch{d.status="error",d.text=n()("clipboard_error")}finally{d.show=!0}};ze(()=>{(async()=>(V(l,await Promise.all(a().map(zm)),!0),V(u,await g(),!0)))()});var w=_Y(),x=M(w);{var E=k=>{{const T=O=>{{let I=_(()=>n()("copy_options"));xr(O,{get"aria-label"(){return c(I)},children:(L,D)=>{o(L)},$$slots:{default:!0}})}};let C=_(()=>!a().length),P=_(()=>n()("copy"));ei(k,{variant:"ghost",get disabled(){return c(C)},get label(){return c(P)},popupPosition:"bottom-right",popup:T,$$slots:{popup:!0}})}},$=k=>{{const T=O=>{o(O)};let C=_(()=>!a().length),P=_(()=>n()("copy"));vt(k,{get disabled(){return c(C)},get label(){return c(P)},popupPosition:"left-top",items:T,$$slots:{items:!0}})}};U(x,k=>{s()?k(E):k($,!1)})}var A=z(x,2);nr(A,{get show(){return d.show},set show(k){d.show=k},children:(k,T)=>{Hn(k,{get status(){return d.status},children:(C,P)=>{var O=Fe();Z(()=>ne(O,d.text)),S(C,O)},$$slots:{default:!0}})},$$slots:{default:!0}}),S(t,w),se(),i()}const Sc={saved:!1,moved:!1,renamed:!1,deleted:!1,published:!1,count:1},Lf=it({...Sc}),bs=it({...Sc}),bY=()=>{const t=oe(Un);if(!t)return;const{name:e,email:n,id:r,login:i}=t;if(!(!e||!n))return{name:e,email:n,id:r,login:i}},yY=async({changes:t,commit:e})=>{const{databaseName:n}=oe(Cn)?.repository??{};if(!n)return;const r=new jo(n,"file-cache"),{files:i,author:o,date:a}=e,s={commitAuthor:o,commitDate:a};await Promise.all(t.map(async l=>{const{action:u,slug:d,path:f,previousPath:h,data:p}=l;if(typeof p!="string"||!d)return;if(u==="delete"){await r.delete(f);return}u==="move"&&await r.delete(h);const g={sha:i[f]?.sha,size:Ox(p).size,text:p,meta:s};await r.set(f,g)}))},wY=({changes:t,savedEntries:e,savedAssets:n})=>{const r=e.map(l=>l.id);to.update(l=>[...l.filter(u=>!r.includes(u.id)),...e]);const i=n.map(l=>l.path),o=t.filter(l=>l.action==="move").map(l=>l.previousPath),a=t.filter(l=>l.action==="delete").map(l=>l.path),s=[...i,...o,...a];Wn.update(l=>[...l.filter(u=>!s.includes(u.path)),...n])},ep=async({changes:t,savingEntries:e=[],savingAssets:n=[],options:r})=>{const{commitChanges:i}=oe(Cn),o={...await i(t,r),author:bY()};oe(ht).devModeEnabled&&(console.debug("Commit changes:",t),console.debug("Commit results:",o));const{files:a,author:s,date:l}=o,u=e.map(f=>({...f,commitAuthor:s,commitDate:l})),d=n.map(f=>{const{sha:h,file:p}=a[f.path]??{},g=p?URL.createObjectURL(p):void 0;return{...f,sha:h,blobURL:g,commitAuthor:s,commitDate:l}});return await yY({changes:t,commit:o}),wY({changes:t,savedEntries:u,savedAssets:d}),{commit:o,savedEntries:u,savedAssets:d}},xY=({assets:t})=>{ba.update(e=>t.some(({path:n})=>e?.path===n)?void 0:e),bs.set({...Sc,deleted:!0,count:t.length})},kY=async t=>{await ep({changes:t.map(({path:e,sha:n})=>({action:"delete",path:e,previousSha:n})),options:{commitType:"deleteMedia"}}),xY({assets:t})};var SY=j("<!> <!>",1);function zN(t,e){ae(e,!0);const n=()=>H(ce,"$_",r),[r,i]=ve();let o=N(e,"assets",19,()=>[]),a=N(e,"buttonDescription",3,""),s=N(e,"dialogDescription",3,""),l=N(e,"onDelete",3,void 0),u=N(e,"useButton",3,!0),d=ie(!1);const f=_(()=>u()?et:vt);var h=SY(),p=M(h);{let m=_(()=>!o().length),v=_(()=>n()("delete"));br(p,()=>c(f),(b,y)=>{y(b,{variant:"ghost",get disabled(){return c(m)},get label(){return c(v)},get"aria-label"(){return a()},onclick:()=>{V(d,!0)}})})}var g=z(p,2);{let m=_(()=>o().length===1?n()("delete_asset"):n()("delete_assets")),v=_(()=>n()("delete"));md(g,{get title(){return c(m)},get okLabel(){return c(v)},onOk:()=>{kY(o()),l()?.()},get open(){return c(d)},set open(b){V(d,b,!0)},children:(b,y)=>{var w=Fe();Z(()=>ne(w,s())),S(b,w)},$$slots:{default:!0}})}S(t,h),se(),i()}var EY=j("<!> <!>",1);function jN(t,e){ae(e,!0);const n=()=>H(ce,"$_",r),[r,i]=ve();let o=N(e,"assets",19,()=>[]),a=N(e,"useButton",3,!0),s=ie(!1);const l=_(()=>a()?et:vt),u=async()=>{for(const p of o())c3(await ss(p),p.name),await Rt(300);V(s,!0)};var d=EY(),f=M(d);{let p=_(()=>!o().length),g=_(()=>n()("download"));br(f,()=>c(l),(m,v)=>{v(m,{variant:"ghost",get disabled(){return c(p)},get label(){return c(g)},onclick:()=>{u()}})})}var h=z(f,2);nr(h,{get show(){return c(s)},set show(p){V(s,p,!0)},children:(p,g)=>{Hn(p,{status:"success",children:(m,v)=>{var b=Fe();Z(y=>ne(b,y),[()=>o().length===1?n()("asset_downloaded"):n()("assets_downloaded")]),S(m,b)},$$slots:{default:!0}})},$$slots:{default:!0}}),S(t,d),se(),i()}var TY=j("<!> <!> <!> <!> <!> <!> <!>",1);function UN(t,e){ae(e,!0);const n=()=>H(ce,"$_",o),r=()=>H(ht,"$prefs",o),i=()=>H(Cn,"$backend",o),[o,a]=ve();let s=N(e,"extraItems",3,void 0),l=ie(At({...wg}));const u=_(()=>c(l).publicURL),d=_(()=>c(l).repoBlobURL),f=async()=>{V(l,e.asset?await zm(e.asset):{...wg},!0)};ze(()=>{e.asset,f()});{const h=g=>{{let m=_(()=>n()("edit_options"));xr(g,{get"aria-label"(){return c(m)},children:(v,b)=>{var y=TY(),w=M(y);Ue(w,()=>s()??He);var x=z(w,2);{let P=_(()=>n()("edit")),O=_(()=>n()("edit_asset")),I=_(()=>!e.asset||!vU(e.asset));vt(x,{variant:"ghost",get label(){return c(P)},get"aria-label"(){return c(O)},get disabled(){return c(I)},onclick:()=>{Je(my,e.asset)}})}var E=z(x,2);{let P=_(()=>n()("rename")),O=_(()=>n()("rename_asset")),I=_(()=>!e.asset);vt(E,{variant:"ghost",get label(){return c(P)},get"aria-label"(){return c(O)},get disabled(){return c(I)},onclick:()=>{Je(eg,e.asset)}})}var $=z(E,2);{let P=_(()=>n()("replace")),O=_(()=>n()("replace_asset")),I=_(()=>!e.asset);vt($,{variant:"ghost",get label(){return c(P)},get"aria-label"(){return c(O)},get disabled(){return c(I)},onclick:()=>{Je(Oo,{folder:void 0,files:[],originalAsset:e.asset}),Je(vs,!0)}})}var A=z($,2);vi(A,{});var k=z(A,2);{let P=_(()=>n()("view_on_live_site")),O=_(()=>!c(u));vt(k,{get label(){return c(P)},get disabled(){return c(O)},onclick:()=>{window.open(c(u))}})}var T=z(k,2);{var C=P=>{{let O=_(()=>!i()?.repository||!c(d)),I=_(()=>n()("view_on_x",{values:{service:i()?.repository?.label},default:n()("view_in_repository")}));vt(P,{get disabled(){return c(O)},get label(){return c(I)},onclick:()=>{window.open(`${c(d)}?plain=1`)}})}};U(T,P=>{r().devModeEnabled&&P(C)})}S(v,y)},$$slots:{default:!0}})}};let p=_(()=>n()("show_edit_options"));ei(t,{variant:"ghost",iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return c(p)},popup:h,$$slots:{popup:!0}})}se(),a()}function oc(t,e){ae(e,!0);const n=()=>H(ce,"$_",i),r=()=>H(Gl,"$isRTL",i),[i,o]=ve();let a=N(e,"useShortcut",3,!1),s=N(e,"onclick",3,void 0);{const l=f=>{{let h=_(()=>r()?"arrow_forward":"arrow_back");Qe(f,{get name(){return c(h)}})}};let u=_(()=>e["aria-label"]??n()("back")),d=_(()=>a()?"Escape":void 0);et(t,{variant:"ghost",iconic:!0,get"aria-label"(){return c(u)},get keyShortcuts(){return c(d)},class:"back",get onclick(){return s()},startIcon:l,$$slots:{startIcon:!0}})}se(),o()}var $Y=j("<!> <!> <!>",1),AY=j('<!> <h2 role="none"><!></h2> <!> <!>',1);function CY(t,e){ae(e,!0);const n=()=>H(zs,"$overlaidAsset",a),r=()=>H(mn,"$isSmallScreen",a),i=()=>H(ce,"$_",a),o=()=>H(Po,"$selectedAssetFolder",a),[a,s]=ve(),l=f=>{var h=$Y(),p=M(h);FN(p,{get assets(){return c(u)},get useButton(){return c(d)}});var g=z(p,2);jN(g,{get assets(){return c(u)},get useButton(){return c(d)}});var m=z(g,2);{let v=_(()=>i()("delete_asset")),b=_(()=>i()("confirm_deleting_this_asset"));zN(m,{get assets(){return c(u)},get buttonDescription(){return c(v)},get dialogDescription(){return c(b)},onDelete:()=>{qs(`/assets/${o()?.internalPath??"-/all"}`)},get useButton(){return c(d)}})}S(f,h)},u=_(()=>n()?[n()]:[]),d=_(()=>!r());{let f=_(()=>i()("primary"));io(t,{variant:"primary",get"aria-label"(){return c(f)},children:(h,p)=>{var g=AY(),m=M(g);{let E=_(()=>i()("cancel_editing"));oc(m,{get"aria-label"(){return c(E)},useShortcut:!0,onclick:()=>{qs(`/assets/${o()?.internalPath??"-/all"}`)}})}var v=z(m,2),b=F(v);Ur(b,{children:(E,$)=>{var A=Fe();Z(()=>ne(A,n()?.name)),S(E,A)},$$slots:{default:!0}});var y=z(v,2);{var w=E=>{l(E)};U(y,E=>{r()||E(w)})}var x=z(y,2);UN(x,{get asset(){return n()},extraItems:$=>{var A=X(),k=M(A);{var T=C=>{l(C)};U(k,C=>{r()&&C(T)})}S($,A)},$$slots:{extraItems:!0}}),S(h,g)},$$slots:{default:!0}})}se(),s()}var PY=j("<img/>"),OY=j("<video></video>",2),LY=j("<audio></audio>"),IY=j('<div role="none" class="blur svelte-1yaifwd"><div role="status" class="overlay svelte-1yaifwd"><!></div> <img role="none" loading="lazy" alt=""/></div>'),NY=j('<div role="none"><!> <!></div>');const RY={hash:"svelte-1yaifwd",code:".preview.svelte-1yaifwd {display:inline-flex;align-items:center;justify-content:center;position:relative;width:100%;height:100%;}.preview.tile.svelte-1yaifwd {border-width:1px;border-style:solid;border-color:transparent;padding:var(--tile-padding, 12px);}.preview.tile.svelte-1yaifwd .sui.icon {font-size:48px;}.preview.icon.svelte-1yaifwd {border-radius:var(--sui-control-medium-border-radius);width:var(--icon-size, 32px);height:var(--icon-size, 32px);}.preview.svelte-1yaifwd:is(.tile:where(.svelte-1yaifwd), .icon:where(.svelte-1yaifwd)) {overflow:hidden;aspect-ratio:1/1;}.preview.svelte-1yaifwd:is(.tile:where(.svelte-1yaifwd), .icon:where(.svelte-1yaifwd)) img:where(.svelte-1yaifwd) {pointer-events:none;}.preview.svelte-1yaifwd .blur:where(.svelte-1yaifwd) {display:contents;}.preview.svelte-1yaifwd .blur:where(.svelte-1yaifwd) > :where(.svelte-1yaifwd) {position:absolute;inset:0;pointer-events:none;}.preview.svelte-1yaifwd .blur:where(.svelte-1yaifwd) .overlay:where(.svelte-1yaifwd) {display:flex;justify-content:center;align-items:center;z-index:-1;backdrop-filter:blur(32px) brightness(0.8);}.preview.svelte-1yaifwd .blur:where(.svelte-1yaifwd) img:where(.svelte-1yaifwd) {width:100%;height:100%;z-index:-2;object-fit:cover;transform:scale(1.2);}.preview.svelte-1yaifwd .blur:where(.svelte-1yaifwd) img.loaded:where(.svelte-1yaifwd) {opacity:1;}.preview.cover.svelte-1yaifwd {padding:0;}.preview.cover.svelte-1yaifwd > :is(img, video) {flex:auto;}.preview.svelte-1yaifwd > :is(img, video) {flex:0;max-width:100%;max-height:100%;}.preview.dissolve.svelte-1yaifwd :is(img, video) {opacity:0;transition:opacity 250ms;}.preview.dissolve.loaded.svelte-1yaifwd :is(img, video) {opacity:1;}.checkerboard.svelte-1yaifwd img:where(.svelte-1yaifwd) {background-image:linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%), linear-gradient(45deg, #ccc 25%, #fff 25%, #fff 75%, #ccc 75%);background-size:8px 8px;background-position:0 0, 4px 4px;}.svelte-1yaifwd:not(.checkerboard) img:where(.svelte-1yaifwd) {background-color:#e5e5e5;}:is(img, video) {object-fit:contain;}.svelte-1yaifwd:is(img, video):not([src]) {visibility:hidden;}.cover.svelte-1yaifwd :is(img, video) {object-fit:cover;aspect-ratio:1/1;}"};function xa(t,e){ae(e,!0),ke(t,RY);const n=()=>H(ce,"$_",r),[r,i]=ve();let o=N(e,"loading",3,"lazy"),a=N(e,"asset",3,void 0),s=N(e,"src",15,void 0),l=N(e,"variant",3,void 0),u=N(e,"blurBackground",3,!1),d=N(e,"cover",3,!1),f=N(e,"checkerboard",3,!1),h=N(e,"dissolve",3,!0),p=N(e,"alt",3,""),g=N(e,"controls",3,!1),m=ot(e,["$$slots","$$events","$$legacy","kind","loading","asset","src","variant","blurBackground","cover","checkerboard","dissolve","alt","controls"]),v=ie(void 0),b=ie(!1),y=ie(!1),w=ie(void 0);const x=_(()=>!!a()&&!!l()&&!g()),E=_(()=>c(x)||e.kind==="image"||a()?.name.endsWith(".pdf"));let $=!1;const A=async()=>{if(!(!a()||!c(v)||$)){$=!0,V(b,!1),o()==="lazy"&&await wy(c(v));try{s(c(x)?await ty(a()):await Nx(a()))}catch{V(b,!0)}u()&&!c(w)&&s()&&V(w,s(),!0),$=!1,qu()}},k=async()=>{!c(v)||!s()||((c(E)?!c(v).complete:!c(v).readyState)&&await new Promise(B=>{c(v)?.addEventListener(c(E)?"load":"loadedmetadata",()=>{B(void 0)},{once:!0})}),h()&&await wy(c(v)),V(y,!0),a()&&c(x)&&s().startsWith("blob:")&&URL.revokeObjectURL(s()))};ze(()=>{a()&&!c(w)&&(async()=>V(w,await ty(a(),{cacheOnly:!0}),!0))()}),ze(()=>{c(v)&&a()&&A()}),ze(()=>{c(v)&&s()&&k()});var T=NY();let C;var P=F(T);{var O=B=>{Qe(B,{name:"draft"})},I=B=>{var K=X(),G=M(K);{var W=R=>{var q=PY();mt(q,()=>({loading:o(),src:s(),alt:p(),...m}),void 0,void 0,void 0,"svelte-1yaifwd"),St(q,J=>V(v,J),()=>c(v)),S(R,q)},Y=R=>{var q=X(),J=M(q);{var Q=re=>{var te=OY();mt(te,()=>({src:s(),controls:g()||void 0,playsinline:!0,...m}),void 0,void 0,void 0,"svelte-1yaifwd"),St(te,de=>V(v,de),()=>c(v)),S(re,te)},ee=re=>{var te=X(),de=M(te);{var he=ge=>{var ye=X(),me=M(ye);{var Ae=_e=>{var fe=LY();mt(fe,()=>({src:s(),controls:!0,playsinline:!0,...m}),void 0,void 0,void 0,"svelte-1yaifwd"),St(fe,be=>V(v,be),()=>c(v)),S(_e,fe)},Ce=_e=>{Qe(_e,{name:"audio_file"})};U(me,_e=>{g()?_e(Ae):_e(Ce,!1)})}S(ge,ye)},ue=ge=>{Qe(ge,{name:"draft"})};U(de,ge=>{e.kind==="audio"?ge(he):ge(ue,!1)},!0)}S(re,te)};U(J,re=>{e.kind==="video"?re(Q):re(ee,!1)},!0)}S(R,q)};U(G,R=>{c(E)?R(W):R(Y,!1)},!0)}S(B,K)};U(P,B=>{c(b)?B(O):B(I,!1)})}var L=z(P,2);{var D=B=>{var K=IY(),G=F(K),W=F(G);{var Y=J=>{var Q=Fe();Z(ee=>ne(Q,ee),[()=>n()("loading")]),S(J,Q)};U(W,J=>{!c(x)&&!c(y)&&J(Y)})}var R=z(G,2);let q;Z(()=>{Se(R,"src",c(w)),q=hn(R,1,"svelte-1yaifwd",null,q,{loaded:!!c(w)})}),S(B,K)};U(L,B=>{u()&&B(D)})}Z(()=>C=hn(T,1,`preview ${l()??""}`,"svelte-1yaifwd",C,{cover:d(),checkerboard:f(),dissolve:h(),loaded:c(y)})),S(t,T),se(),i()}var MY=j("<div></div>");const DY={hash:"svelte-1c5gj1k",code:`.leaflet-pane,
|
|
479
479
|
.leaflet-tile,
|
|
@@ -643,7 +643,7 @@ Required JSON structure:
|
|
|
643
643
|
["translation 1", "translation 2", ...]`},mR=t=>`Translate these texts and return ONLY valid JSON (no markdown, no code blocks):
|
|
644
644
|
${JSON.stringify(t)}
|
|
645
645
|
|
|
646
|
-
Respond with JSON only:`,xZ="anthropic",kZ="Anthropic Claude",SZ="Anthropic API",EZ="https://docs.claude.com/en/api/overview",TZ="https://platform.claude.com/settings/keys",$Z=/sk-ant-api03-[a-zA-Z0-9-_]{80,}/,AZ=async({sourceLanguage:t,targetLanguage:e})=>!!Hs(t)&&!!Hs(e),CZ=async(t,{sourceLanguage:e,targetLanguage:n,apiKey:r})=>{const i=Hs(e),o=Hs(n);if(!i)throw new Error("Source locale is not supported.");if(!o)throw new Error("Target locale is not supported.");const a="https://api.anthropic.com/v1/messages",s=gR(i,o),l=mR(t),u={model:"claude-haiku-4-5",max_tokens:4e3,temperature:.3,system:s,messages:[{role:"user",content:l}]};try{const d=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":r,"anthropic-version":"2023-06-01","anthropic-dangerous-direct-browser-access":"true"},body:JSON.stringify(u)});if(!d.ok){const g=await d.json().catch(()=>({}));throw new Error(`Anthropic API error: ${d.status} ${d.statusText}${g.error?.message?` - ${g.error.message}`:""}`)}const f=await d.json();if(!f.content||!Array.isArray(f.content)||!f.content[0])throw new Error("Invalid response format from Anthropic API.");const h=f.content[0].text.trim();let p;try{p=JSON.parse(h)}catch{throw new Error("Failed to parse JSON response from Anthropic API.")}if(!Array.isArray(p))throw new Error("Invalid JSON structure in Anthropic API response.");if(p.length!==t.length){const g=t.length,m=p.length;throw new Error(`Translation count mismatch: expected ${g}, got ${m}`)}return p}catch(d){throw d instanceof Error?d:new Error("Failed to translate text with Anthropic API.")}},PZ={serviceId:xZ,serviceLabel:kZ,apiLabel:SZ,developerURL:EZ,apiKeyURL:TZ,apiKeyPattern:$Z,markdownSupported:!0,availability:AZ,translate:CZ},OZ="google",LZ="Google Cloud Translation",IZ="Cloud Translation API",NZ="https://console.cloud.google.com/apis/library/translate.googleapis.com",RZ="https://console.cloud.google.com/apis/api/translate.googleapis.com/credentials",MZ=/AIza[0-9A-Za-z-_]{35}/,b$=["ab,ace,ach,af,ak,alz,am,ar,as,awa,ay,az","ba,ban,bbc,be,bem,bew,bg,bho,bik,bm,bn,br,bs,bts,btx,bua","ca,ceb,cgg,chm,ckb,cnh,co,crh,crs,cs,cv,cy","da,de,din,doi,dov,dv,dz","ee,el,en,eo,es,et,eu","fa,ff,fi,fil,fj,fr,fr-CA,fr-FR,fy","ga,gaa,gd,gl,gn,gom,gu","ha,haw,he,hi,hil,hmn,hr,hrx,ht,hu,hy","id,ig,ilo,is,it,iw","ja,jv,jw","ka,kk,km,kn,ko,kri,ktu,ku,ky","la,lb,lg,li,lij,lmo,ln,lo,lt,ltg,luo,lus,lv","mai,mak,mg,mi,min,mk,ml,mn,mni-Mtei,mr,ms,ms-Arab,mt,my","ne,new,nl,no,nr,nso,nus,ny","oc,om,or","pa,pa-Arab,pag,pam,pap,pl,ps,pt,pt-BR,pt-PT","qu","rn,ro,rom,ru,rw","sa,scn,sd,sg,shn,si,sk,sl,sm,sn,so,sq,sr,ss,st,su,sv,sw,szl","ta,te,tet,tg,th,ti,tk,tl,tn,tr,ts,tt","ug,uk,ur,uz","vi","xh","yi,yo,yua,yue","zh,zh-CN,zh-TW,zu"].join(",").split(","),tm=t=>{const e=t.replace(/^([a-z]{2,3})[-_]([a-z]{2,4})$/i,(r,i,o)=>`${i.toLowerCase()}-${o.toUpperCase()}`);if(b$.includes(e))return e;if(["zh-HK","zh-MO"].includes(e))return"zh-TW";const[n]=e.split("-");if(b$.includes(n))return n},DZ=async({sourceLanguage:t,targetLanguage:e})=>!!tm(t)&&!!tm(e),FZ=async(t,{sourceLanguage:e,targetLanguage:n,apiKey:r})=>{if(e=tm(e)??"",n=tm(n)??"",!e)throw new Error("Source locale is not supported.");if(!n)throw new Error("Target locale is not supported.");const i="https://translation.googleapis.com/language/translate/v2",o={q:t,source:e,target:n,format:"html"};try{const a=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json","X-goog-api-key":r},body:JSON.stringify(o)});if(!a.ok){const l=await a.json().catch(()=>({}));throw new Error(`Google Translate API error: ${a.status} ${a.statusText}${l.error?.message?` - ${l.error.message}`:""}`)}const{data:s}=await a.json();return s.translations.map(l=>l.translatedText)}catch(a){throw a instanceof Error?a:new Error("Failed to translate text with Google Translate API.")}},vR={serviceId:OZ,serviceLabel:LZ,apiLabel:IZ,developerURL:NZ,apiKeyURL:RZ,apiKeyPattern:MZ,markdownSupported:!1,availability:DZ,translate:FZ},zZ="openai",jZ="OpenAI GPT",UZ="OpenAI API",BZ="https://platform.openai.com/docs/overview",qZ="https://platform.openai.com/api-keys",HZ=/sk-[a-zA-Z0-9-_]{40,}/,KZ=async({sourceLanguage:t,targetLanguage:e})=>!!Hs(t)&&!!Hs(e),VZ=async(t,{sourceLanguage:e,targetLanguage:n,apiKey:r})=>{const i=Hs(e),o=Hs(n);if(!i)throw new Error("Source locale is not supported.");if(!o)throw new Error("Target locale is not supported.");const a="https://api.openai.com/v1/chat/completions",s=gR(i,o),l=mR(t),u={model:"gpt-4o-mini",messages:[{role:"system",content:s},{role:"user",content:l}],temperature:.3,max_tokens:4e3};try{const d=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`},body:JSON.stringify(u)});if(!d.ok){const g=await d.json().catch(()=>({}));throw new Error(`OpenAI API error: ${d.status} ${d.statusText}${g.error?.message?` - ${g.error.message}`:""}`)}const f=await d.json();if(!f.choices||!f.choices[0]||!f.choices[0].message)throw new Error("Invalid response format from OpenAI API.");const h=f.choices[0].message.content.trim();let p;try{p=JSON.parse(h)}catch{throw new Error("Failed to parse JSON response from OpenAI API.")}if(!Array.isArray(p))throw new Error("Invalid JSON structure in OpenAI API response.");if(p.length!==t.length){const g=t.length,m=p.length;throw new Error(`Translation count mismatch: expected ${g}, got ${m}`)}return p}catch(d){throw d instanceof Error?d:new Error("Failed to translate text with OpenAI API.")}},GZ={serviceId:zZ,serviceLabel:jZ,apiLabel:UZ,developerURL:BZ,apiKeyURL:qZ,apiKeyPattern:HZ,markdownSupported:!0,availability:KZ,translate:VZ},S1={google:vR,anthropic:PZ,openai:GZ},xv=sn([ht],([t])=>{const{defaultTranslationService:e="google"}=t;return S1[e]??vR}),_R=new em({headingStyle:"atx",bulletListMarker:"-",codeBlockStyle:"fenced"});_R.keep(["span","div"]);const WZ=({draft:t,options:e})=>{const{collectionName:n,fileName:r,currentValues:i,isIndexFile:o}=t,{sourceLanguage:a,targetLanguage:s,keyPath:l="",translate:u=!1}=e,d=i[a],f={collectionName:n,fileName:r,valueMap:d,isIndexFile:o};return Object.fromEntries(Object.entries(d).map(([h,p])=>{const g=i[s][h],m=gn({...f,keyPath:h}),v=m?.widget??"string";return l&&!h.startsWith(l)||typeof p!="string"||!p||!["markdown","text","string","list"].includes(v)||v==="list"&&hd(m).hasSubFields||!u&&p===g||!l&&u&&g?null:[h,{value:p,isMarkdown:v==="markdown"}]}).filter(h=>!!h))},If=(t,e,{count:n,sourceLanguage:r})=>{_y.set({id:Date.now(),show:!0,status:t,message:e,count:n,sourceLanguage:r})},YZ=async({currentValues:t,options:e,copingFieldMap:n})=>{const{serviceId:r,markdownSupported:i,translate:o}=oe(xv),{sourceLanguage:a,targetLanguage:s}=e,l=Object.keys(n).length,u=l===1?"one":"many",d=oe(ht).apiKeys?.[r]||await new Promise(f=>{sf.set({show:!0,multiple:l>1,resolve:f})});if(d){If("info","translation.started",{count:l,sourceLanguage:a});try{const f=await o(Object.entries(n).map(([,{value:h,isMarkdown:p}])=>p&&!i?Yx(h):h),{apiKey:d,sourceLanguage:a,targetLanguage:s});Object.entries(n).forEach(([h,{isMarkdown:p}],g)=>{const m=f[g];t[s][h]=p&&!i?_R.turndown(m):m}),If("success",`translation.complete.${u}`,{count:l,sourceLanguage:a})}catch(f){If("error","translation.error",{count:l,sourceLanguage:a}),console.error(f)}}},JZ=({currentValues:t,options:e,copingFieldMap:n})=>{const{sourceLanguage:r,targetLanguage:i}=e,o=Object.keys(n).length,a=o===1?"one":"many";Object.entries(n).forEach(([s,{value:l}])=>{t[i][s]=l}),If("success",`copy.complete.${a}`,{count:o,sourceLanguage:r})},bR=async t=>{const{sourceLanguage:e,translate:n=!1}=t,r=oe(Xe),{currentValues:i}=r,o=WZ({draft:r,options:t}),a=Object.keys(o).length;if(!a){If("info",`${n?"translation":"copy"}.none`,{count:a,sourceLanguage:e});return}n?await YZ({currentValues:i,options:t,copingFieldMap:o}):JZ({currentValues:i,options:t,copingFieldMap:o}),Xe.update(s=>({...s,currentValues:i}))};function E1(t,e){ae(e,!0);const n=()=>H(Xe,"$entryDraft",o),r=()=>H(xv,"$translator",o),i=()=>H(ce,"$_",o),[o,a]=ve();let s=N(e,"keyPath",3,""),l=N(e,"translate",3,!1);const u=async({sourceLanguage:h,targetLanguage:p})=>!n()?.currentLocales[p]||!n().currentLocales[h]||!!s()&&!Kn(n().currentValues[h])[s()]||!l()&&!!s()&&Kn(n().currentValues[h])[s()]===Kn(n().currentValues[p])[s()]||l()&&!await r()?.availability({sourceLanguage:h,targetLanguage:p});var d=X(),f=M(d);rt(f,17,()=>e.otherLocales,yr,(h,p)=>{const g=_(()=>({sourceLanguage:c(p),targetLanguage:e.locale}));var m=X(),v=M(m);En(v,()=>u(c(g)),null,(b,y)=>{{let w=_(()=>i()(l()?"translate_from_x":"copy_from_x",{values:{locale:Uo(c(p))}}));vt(b,{get label(){return c(w)},get disabled(){return c(y)},onclick:()=>{bR({...c(g),keyPath:s(),translate:l()})}})}}),S(h,m)}),S(t,d),se(),a()}var XZ=j("<section><!></section>");const ZZ={hash:"svelte-wzztxu",code:"section.svelte-wzztxu {padding:var(--field-editor-padding);}section.svelte-wzztxu:not(:last-child) {border-width:0 0 1px;border-color:var(--sui-secondary-border-color);}section.svelte-wzztxu > * {margin-inline:auto !important;max-width:768px;}section.svelte-wzztxu > header {display:flex;align-items:center;margin:0 -8px 8px;height:var(--sui-button-small-height);}section.svelte-wzztxu > header h4 {margin-inline:8px 0;font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-bold);color:var(--sui-secondary-foreground-color);}section.svelte-wzztxu > header .required {margin-block:2px 0;margin-inline:2px 0;color:var(--sui-error-foreground-color);font-size:var(--sui-font-size-large);}"};function yR(t,e){ke(t,ZZ);let n=N(e,"children",3,void 0),r=ot(e,["$$slots","$$events","$$legacy","children"]);var i=XZ();mt(i,()=>({role:"group",class:"field",...r}),void 0,void 0,void 0,"svelte-wzztxu");var o=F(i);Ue(o,()=>n()??He),S(t,i)}function wR(t,e){ae(e,!0);const n=()=>H(Xe,"$entryDraft",o),r=()=>H(xv,"$translator",o),i=()=>H(ce,"$_",o),[o,a]=ve();let s=N(e,"size",3,"medium"),l=N(e,"keyPath",3,"");const u=_(()=>!n()?.currentLocales[e.locale]),d=async({sourceLanguage:m,targetLanguage:v})=>c(u)||!n()?.currentLocales[m]||!await r()?.availability({sourceLanguage:m,targetLanguage:v});var f=X(),h=M(f);{var p=m=>{const v=_(()=>{const[E]=e.otherLocales;return{otherLocale:E}}),b=_(()=>i()("translate_from_x",{values:{locale:Uo(c(v).otherLocale)??c(v).otherLocale}})),y=_(()=>({sourceLanguage:c(v).otherLocale,targetLanguage:e.locale}));var w=X(),x=M(w);En(x,()=>d(c(y)),null,(E,$)=>{et(E,{variant:"ghost",get size(){return s()},iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return c(b)},get title(){return c(b)},get disabled(){return c($)},onclick:()=>{bR({...c(y),keyPath:l(),translate:!0})},startIcon:k=>{Qe(k,{name:"translate"})},$$slots:{startIcon:!0}})}),S(m,w)},g=m=>{{const v=w=>{Qe(w,{name:"translate"})},b=w=>{{let x=_(()=>i()("translation_options"));xr(w,{get"aria-label"(){return c(x)},children:(E,$)=>{E1(E,{get locale(){return e.locale},get otherLocales(){return e.otherLocales},get keyPath(){return l()},translate:!0})},$$slots:{default:!0}})}};let y=_(()=>i()("translate"));ei(m,{variant:"ghost",get size(){return s()},iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return c(y)},get disabled(){return c(u)},endIcon:v,popup:b,$$slots:{endIcon:!0,popup:!0}})}};U(h,m=>{e.otherLocales.length===1?m(p):m(g,!1)})}S(t,f),se(),a()}var QZ=j('<div role="alert" class="validation svelte-6wra4i" aria-live="polite"><div role="none" class="svelte-6wra4i"><!> <!></div></div>');const eQ={hash:"svelte-6wra4i",code:".validation.svelte-6wra4i {color:var(--sui-error-foreground-color) !important;font-size:var(--sui-font-size-small);}.validation.svelte-6wra4i div:where(.svelte-6wra4i) {display:flex;align-items:center;gap:4px;margin:4px 0;}.validation.svelte-6wra4i div:where(.svelte-6wra4i) .icon {flex:none;font-size:16px; /* !hardcoded */}"};function T1(t,e){ke(t,eQ);var n=QZ(),r=F(n),i=F(r);Qe(i,{name:"error"});var o=z(i,2);Ue(o,()=>e.children),Z(()=>Se(n,"id",e.id)),S(t,n)}function tQ(t,e){ae(e,!0);let n=N(e,"currentValue",15),r=N(e,"required",3,!0),i=N(e,"readonly",3,!1),o=N(e,"invalid",3,!1);w0(t,{get readonly(){return i()},get required(){return r()},get invalid(){return o()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get checked(){return n()},set checked(a){n(a)}}),se()}var nQ=j("<p> </p>");function rQ(t,e){ae(e,!0);const n=()=>H(ce,"$_",r),[r,i]=ve();let o=N(e,"currentValue",3,!1);var a=X(),s=M(a);{var l=u=>{var d=nQ(),f=F(d);Z(h=>ne(f,h),[()=>n()(`boolean.${o()}`)]),S(u,d)};U(s,u=>{typeof o()=="boolean"&&u(l)})}S(t,a),se(),i()}function iQ(t,e){ae(e,!0);const n=()=>H(Xe,"$entryDraft",r),[r,i]=ve(),{valueStoreKey:o="currentValues"}=pr("field-editor")??{};let a=N(e,"currentValue",15),s=N(e,"required",3,!0),l=N(e,"readonly",3,!1),u=N(e,"invalid",3,!1),d=ie(""),f=ie("");const h=_(()=>at(e.fieldConfig.default_language,"")),p=_(()=>at(e.fieldConfig.allow_language_selection,!0)),g=_(()=>at(e.fieldConfig.output_code_only,!1)),m=_(()=>at(e.fieldConfig.keys,()=>({code:"code",lang:"lang"}),!0)),v=_(()=>Kn(n()?.[o][e.locale])??{}),b=_(()=>`${e.keyPath}.${c(m).code}`),y=_(()=>`${e.keyPath}.${c(m).lang}`),w=()=>{if(c(g))typeof a()!="string"?V(d,""):c(d)!==a()&&V(d,a(),!0);else{const A=c(v)[c(b)],k=c(v)[c(y)]||c(h);typeof A!="string"?V(d,""):c(d)!==A&&V(d,A,!0),typeof k!="string"?V(f,""):c(f)!==k&&V(f,k,!0)}},x=()=>{c(g)?a()!==c(d)&&a(c(d)):n()&&(a({}),c(v)[c(b)]!==c(d)&&bt(Xe,xe(n)[o][e.locale][c(b)]=c(d),xe(n)),c(v)[c(y)]!==c(f)&&bt(Xe,xe(n)[o][e.locale][c(y)]=c(f),xe(n)))};ze(()=>{c(v),xe(()=>{w()})}),ze(()=>{c(d),c(f),xe(()=>{x()})});var E=X(),$=M(E);En($,Rt,null,A=>{var k=X(),T=M(k);fr(T,()=>JSON.stringify(e.fieldConfig),C=>{ZG(C,{get showLanguageSwitcher(){return c(p)},flex:!0,get readonly(){return l()},get required(){return s()},get invalid(){return u()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get code(){return c(d)},set code(P){V(d,P,!0)},get lang(){return c(f)},set lang(P){V(f,P,!0)}})}),S(A,k)}),S(t,E),se(),i()}var oQ=j("<pre> </pre>");function aQ(t,e){ae(e,!0);const n=()=>H(Xe,"$entryDraft",r),[r,i]=ve(),o=_(()=>at(e.fieldConfig.default_language,"")),a=_(()=>at(e.fieldConfig.output_code_only,!1)),s=_(()=>at(e.fieldConfig.keys,()=>({code:"code",lang:"lang"}),!0)),l=_(()=>Kn(n()?.currentValues[e.locale])??{}),u=_(()=>`${e.keyPath}.${c(s).code}`),d=_(()=>`${e.keyPath}.${c(s).lang}`),f=_(()=>c(a)?e.currentValue:c(l)[c(u)]),h=_(()=>c(a)?c(o):c(l)[c(d)]);var p=X(),g=M(p);{var m=v=>{var b=oQ(),y=F(b);Z(()=>{hn(b,1,yC(c(h)?`language-${c(h)}`:void 0)),ne(y,c(f))}),S(v,b)};U(g,v=>{c(f)&&v(m)})}S(t,p),se(),i()}var sQ=j(" <!>",1),lQ=j('<span role="none" class="value svelte-1usff15"><!> <!></span>'),cQ=j('<div role="none" class="svelte-1usff15"><input type="color" class="svelte-1usff15"/> <!> <!></div>');const uQ={hash:"svelte-1usff15",code:"div.svelte-1usff15 {display:flex;align-items:center;gap:8px;}div.svelte-1usff15 .value:where(.svelte-1usff15) {display:flex;align-items:center;gap:8px;}div.svelte-1usff15 .value:where(.svelte-1usff15) .sui.text-input {width:80px;min-width:0;}div.svelte-1usff15 .value:where(.svelte-1usff15) .sui.slider {padding:8px;--sui-slider-base-width: 80px;}input.svelte-1usff15 {font-family:var(--sui-textbox-font-family);}"};function dQ(t,e){const n=Jn();ae(e,!0),ke(t,uQ);const r=()=>H(ce,"$_",i),[i,o]=ve();let a=N(e,"currentValue",15),s=N(e,"required",3,!0),l=N(e,"readonly",3,!1),u=N(e,"invalid",3,!1),d=ie(""),f=ie(255);const h=_(()=>at(e.fieldConfig.allowInput,!1)),p=_(()=>at(e.fieldConfig.enableAlpha,!1)),g=/^#[0-9a-f]{6}$/,m=/^(?<rgb>#[0-9a-f]{6})(?<a>[0-9a-f]{2})?$/,v=()=>{if(typeof a()!="string")return;const{rgb:k,a:T="ff"}=a().match(m)?.groups??{};if(k&&c(d)!==k&&V(d,k,!0),k&&c(p)){const C=Number.parseInt(`0x${T}`,16);c(f)!==C&&V(f,C,!0)}},b=()=>{let k=g.test(c(d))?c(d):"";k&&c(p)&&(k+=c(f).toString(16).padStart(2,"0")),a()!==k&&a(k)};ze(()=>{a(),xe(()=>{v()})}),ze(()=>{c(d),c(f),xe(()=>{b()})});var y=cQ(),w=F(y),x=z(w,2);{var E=k=>{var T=lQ(),C=F(T);{var P=L=>{Yn(L,{get id(){return`${n}-input`},get invalid(){return u()},get readonly(){return l()},get required(){return s()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return c(d)},set value(D){V(d,D,!0)}})};U(C,L=>{c(h)&&L(P)})}var O=z(C,2);{var I=L=>{var D=sQ(),B=M(D),K=z(B);{let G=_(()=>!c(d)),W=_(()=>r()("opacity"));$9(K,{min:0,max:255,get disabled(){return c(G)},get"aria-label"(){return c(W)},get value(){return c(f)},set value(Y){V(f,Y,!0)}})}Z(G=>ne(B,`${G??""} `),[()=>r()("opacity")]),S(L,D)};U(O,L=>{c(p)&&L(I)})}S(k,T)};U(x,k=>{(c(h)||c(p))&&k(E)})}var $=z(x,2);{var A=k=>{{let T=_(()=>r()("clear")),C=_(()=>!c(d)),P=_(()=>`${n}-picker ${c(h)?`${n}-input`:""}`);et(k,{variant:"tertiary",get label(){return c(T)},get disabled(){return c(C)},get"aria-controls"(){return c(P)},onclick:()=>{V(d,""),V(f,255)}})}};U($,k=>{!l()&&!s()&&k(A)})}Z(()=>{Se(w,"id",`${n}-picker`),w.readOnly=l(),Se(w,"aria-invalid",u()),Se(w,"aria-readonly",l()),Se(w,"aria-required",s()),Se(w,"aria-labelledby",`${e.fieldId??""}-label`),Se(w,"aria-errormessage",`${e.fieldId??""}-error`)}),pm(w,()=>c(d),k=>V(d,k)),S(t,y),se(),o()}var fQ=j('<p><span role="none" class="preview svelte-1pgn31g"><span role="none" class="color svelte-1pgn31g"></span> <span role="none" class="value"> </span> <span role="none" class="value"> </span></span></p>');const hQ={hash:"svelte-1pgn31g",code:".preview.svelte-1pgn31g {display:inline-flex;align-items:center;gap:8px;}.preview.svelte-1pgn31g .color:where(.svelte-1pgn31g) {display:block;width:24px;height:24px;border-radius:24px;}"};function pQ(t,e){ae(e,!0),ke(t,hQ);const n=_(()=>at(e.fieldConfig.enableAlpha,!1)),r=u=>Number.parseInt(`0x${u}`,16),i=/^#(?<r>[0-9a-f]{2})(?<g>[0-9a-f]{2})(?<b>[0-9a-f]{2})(?<a>[0-9a-f]{2})?$/,o=_(()=>{const{r:u,g:d,b:f,a:h}=e.currentValue?.match(i)?.groups??{};return u?`rgb(${r(u)} ${r(d)} ${r(f)}${c(n)&&h?` / ${Math.round(r(h)/255*100)}%`:""})`:""});var a=X(),s=M(a);{var l=u=>{var d=fQ(),f=F(d),h=F(f);let p;var g=z(h,2),m=F(g),v=z(g,2),b=F(v);Z(()=>{p=Co(h,"",p,{"background-color":e.currentValue}),ne(m,e.currentValue),ne(b,c(o))}),S(u,d)};U(s,u=>{typeof e.currentValue=="string"&&e.currentValue.trim()&&u(l)})}S(t,a),se()}function gQ(t,e){ae(e,!0);const n=()=>H(Xe,"$entryDraft",r),[r,i]=ve(),{valueStoreKey:o="currentValues"}=pr("field-editor")??{};let a=N(e,"currentValue",15),s=N(e,"required",3,!0),l=N(e,"readonly",3,!1),u=N(e,"invalid",3,!1);const d=_(()=>at(e.fieldConfig.value,"")),f=_(()=>n()?.isIndexFile??!1),h=_(()=>n()?.collectionName??""),p=_(()=>n()?.fileName),g=_(()=>Kn(n()?.[o][e.locale])??{}),m=_(()=>Hl(e.locale)),v=()=>{const[y]=e.keyPath.split(".").splice(-2,1);return y?.match(/^\d+$/)?Number(y):void 0},b=()=>{if(!Object.keys(c(g)).includes(e.keyPath))return;const y=c(d)==="{{index}}"?v()??"":c(d).replaceAll(/{{(.+?)}}/g,(w,x)=>{if(x==="index")return String(v()??"");if(!x.startsWith("fields."))return"";const E=dd({collectionName:c(h),fileName:c(p),valueMap:c(g),keyPath:x.replace(/^fields\./,""),locale:e.locale,isIndexFile:c(f)});return Array.isArray(E)?c(m).format(E):String(E)});a()!==y&&a(y)};ze(()=>{c(g),xe(()=>{b()})});{let y=_(()=>String(a()));Yn(t,{get value(){return c(y)},flex:!0,get readonly(){return l()},get required(){return s()},get invalid(){return u()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`}})}se(),i()}var mQ=j('<p dir="auto"> </p>');function vQ(t,e){ae(e,!0);var n=mQ(),r=F(n);Z(i=>{Se(n,"lang",i),ne(r,e.currentValue),n.dir=n.dir},[()=>jr(e.locale)]),S(t,n),se()}var _Q=j('<span role="none" class="utc svelte-boo8ot">UTC</span>'),bQ=j('<div role="none" class="svelte-boo8ot"><input/> <!> <!> <!></div>');const yQ={hash:"svelte-boo8ot",code:"div.svelte-boo8ot {display:flex;align-items:center;}.utc.svelte-boo8ot {margin:0 8px;color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);}"};function wQ(t,e){ae(e,!0),ke(t,yQ);const n=()=>H(ce,"$_",r),[r,i]=ve();let o=N(e,"currentValue",15),a=N(e,"required",3,!0),s=N(e,"readonly",3,!1),l=N(e,"invalid",3,!1),u=ie("");const d=_(()=>Js(e.fieldConfig)),f=_(()=>c(d).dateOnly),h=_(()=>c(d).timeOnly),p=_(()=>c(d).utc),g=()=>{const k=JU(o(),e.fieldConfig);k!==void 0&&k!==c(u)&&V(u,k,!0)},m=()=>{const k=qP(c(u),o(),e.fieldConfig);k!==void 0&&k!==o()&&Number(Pu(k,e.fieldConfig))!==Number(Pu(o(),e.fieldConfig))&&o(k)};ze(()=>{o(),xe(()=>{g()})}),ze(()=>{c(u),xe(()=>{m()})});var v=bQ(),b=F(v),y=z(b,2);{var w=k=>{var T=_Q();S(k,T)};U(y,k=>{c(p)&&k(w)})}var x=z(y,2);{var E=k=>{{let T=_(()=>n()(c(f)?"today":"now"));et(k,{variant:"tertiary",get label(){return c(T)},onclick:()=>{const C=BP(e.fieldConfig);V(u,c(p)?C.replace(/:00\.000Z$/,""):C,!0)}})}};U(x,k=>{s()||k(E)})}var $=z(x,2);{var A=k=>{{let T=_(()=>n()("clear")),C=_(()=>!o());et(k,{variant:"tertiary",get label(){return c(T)},get disabled(){return c(C)},onclick:()=>{o("")}})}};U($,k=>{!s()&&!a()&&k(A)})}Z(()=>{Se(b,"type",c(f)?"date":c(h)?"time":"datetime-local"),b.readOnly=s(),Se(b,"aria-readonly",s()),Se(b,"aria-required",a()),Se(b,"aria-invalid",l()),Se(b,"aria-labelledby",`${e.fieldId??""}-label`),Se(b,"aria-errormessage",`${e.fieldId??""}-error`)}),pm(b,()=>c(u),k=>V(u,k)),S(t,v),se(),i()}var xQ=j('<p dir="auto"> <!></p>');function kQ(t,e){ae(e,!0);const n=_(()=>HP({locale:e.locale,fieldConfig:e.fieldConfig,currentValue:e.currentValue}));var r=X(),i=M(r);{var o=a=>{var s=xQ(),l=F(s),u=z(l);{var d=f=>{var h=Fe("UTC");S(f,h)};U(u,f=>{e.fieldConfig.picker_utc&&f(d)})}Z(f=>{Se(s,"lang",f),ne(l,`${c(n)??""} `),s.dir=s.dir},[()=>jr(e.locale)]),S(a,s)};U(i,a=>{c(n)&&a(o)})}S(t,r),se()}const y$="https://console.cloudinary.com",SQ=["cloud_name","api_key","username","timestamp","signature","integration","use_saml","saml_iframe_support"],EQ=["integration","inline_container","z_index","multiple","max_files","default_transformations","insert_caption","remove_header","folder","search","collection","asset","transformation","sandboxNotAllowedAttributes","theme"],cw=t=>{const e=oe(Pt);if(t??=e,t?.media_libraries?.cloudinary)return t.media_libraries.cloudinary;if(!t?.media_library)return;const n=t.media_library.name==="cloudinary",r=!t.media_library.name&&e?.media_library?.name==="cloudinary";if(n||r)return t.media_library},TQ=t=>{const e=cw()??{config:{}},n=cw(t)??{config:{}};return{...e,...n,config:{...e.config,...n.config}}},$Q=()=>{const{cloud_name:t,api_key:e}=cw()?.config??{};return{cloudName:t,apiKey:e}},AQ=()=>{const{cloudName:t,apiKey:e}=$Q();return!!(t&&e)},CQ={serviceType:"cloud_storage",serviceId:"cloudinary",serviceLabel:"Cloudinary",serviceURL:"https://cloudinary.com/",showServiceLink:!0,hotlinking:!0,authType:"widget",developerURL:"https://cloudinary.com/documentation/",apiKeyURL:"https://console.cloudinary.com/settings/api-keys",apiKeyPattern:/^[A-Za-z0-9_-]{15,}$/,isEnabled:AQ};var PQ=j('<!> <div role="none"> </div>',1),OQ=j('<iframe allow="camera; storage-access" class="svelte-p06t0o"></iframe> <!>',1);const LQ={hash:"svelte-p06t0o",code:"iframe.svelte-p06t0o {display:block;width:100%;height:100%;border:none;&[hidden] {display:none;}}"};function IQ(t,e){ae(e,!0),ke(t,LQ);const n=()=>H(ce,"$_",r),[r,i]=ve();let o=N(e,"multiple",3,!1),a=N(e,"hidden",3,!1);const s=_(()=>TQ(e.fieldConfig)??{});let l="",u=ie(!1),d=ie(!1),f=ie(void 0);const h=()=>{if(!c(f))return;l=window.crypto.randomUUID();const x=new URLSearchParams({...Object.fromEntries(Object.entries(c(s).config??{}).filter(([E])=>SQ.includes(E))),ml_id:l,pmHost:window.location.origin,new_cms:"true",remove_header:"true"});c(f).src=`https://console.cloudinary.com/console/media_library/cms?${x}`},p=()=>{const x={...Object.fromEntries(Object.entries(c(s).config??{}).filter(([$])=>EQ.includes($))),multiple:o(),max_files:e.fieldConfig?.max??c(s).config?.max_files??20,folder:{path:c(s).config?.folder?.path??"",resource_type:e.kind??"raw"}},E={type:"ML_WIDGET_SHOW",data:{mlId:l,config:x}};console.debug("Cloudinary Panel sending message:",E),c(f)?.contentWindow?.postMessage(JSON.stringify(E),y$)},g=({assets:x})=>{const{output_filename_only:E=!1,use_transformations:$=!0}=c(s),A=x.map(k=>{const T=k.secure_url;return E?{url:T.split("/").pop()}:$?{url:k.derived?.[0]?.secure_url??T}:{url:T}});e.onSelect(A)},m=({origin:x,data:E})=>{if(x===y$){if(typeof E=="string")try{E=JSON.parse(E)}catch{return}$t(E)&&(console.debug("Cloudinary Panel received message:",E),E.type==="login"&&E.consoleDomain&&V(u,!0),E.type==="consoleLoaded"&&V(d,!0),E.type==="ML_WIDGET_INSERT_DATA"&&g(E.data))}};Vt(()=>(h(),window.addEventListener("message",m),()=>{window.removeEventListener("message",m)})),ze(()=>{c(s)&&c(d)&&p()});var v=OQ(),b=M(v);St(b,x=>V(f,x),()=>c(f));var y=z(b,2);{var w=x=>{cr(x,{children:(E,$)=>{var A=PQ(),k=M(A);{let P=_(()=>n()("cloud_storage.cloudinary.activate.button_label"));et(k,{variant:"primary",get label(){return c(P)},onclick:async()=>{window.open("https://console.cloudinary.com/console/media_library/cms_login?cms=true")}})}var T=z(k,2),C=F(T);Z(P=>ne(C,P),[()=>n()("cloud_storage.cloudinary.activate.description")]),S(E,A)},$$slots:{default:!0}})};U(y,x=>{c(u)||x(w)})}Z(x=>{Se(b,"title",x),Se(b,"hidden",a()||!c(u))},[()=>n()("cloud_storage.cloudinary.iframe_title")]),S(t,v),se(),i()}var NQ=j('<span role="none" class="icon check-background"><!></span>'),RQ=j('<div role="none"><!></div>');const MQ={hash:"svelte-1fitgoo",code:".wrapper.svelte-1fitgoo {display:contents;}.wrapper.svelte-1fitgoo [role=option] {position:relative;}.wrapper.svelte-1fitgoo [role=option] > .icon.check {display:none;}.wrapper.svelte-1fitgoo [role=option][aria-selected=false] .check-background {border-color:var(--sui-checkbox-border-color);background-color:var(--sui-checkbox-background-color);}.wrapper.svelte-1fitgoo [role=option][aria-selected=false] .check-background .icon {display:none;}.wrapper.svelte-1fitgoo [role=option][aria-selected=true] .check-background {border-color:var(--sui-primary-accent-color);color:var(--sui-primary-accent-color-inverted);background-color:var(--sui-primary-accent-color);}.wrapper.svelte-1fitgoo [role=option] .check-background {display:flex;justify-content:center;align-items:center;border-width:1px;border-radius:var(--sui-checkbox-border-radius);width:20px;height:20px;pointer-events:none;}.wrapper.svelte-1fitgoo [role=option] .check-background .icon {color:inherit !important;font-size:20px;}.wrapper.grid.svelte-1fitgoo .check-background {position:absolute;inset-block-start:8px;inset-inline-start:8px;z-index:1;}.wrapper.list.svelte-1fitgoo .check-background {margin-inline-start:16px;}"};function xR(t,e){ke(t,MQ);let n=N(e,"viewType",3,"grid");var r=RQ(),i=F(r);Mr(i,{label:"",get value(){return e.value},get selected(){return e.selected},get onChange(){return e.onChange},startIcon:a=>{var s=X(),l=M(s);{var u=d=>{var f=NQ(),h=F(f);Qe(h,{name:"check",class:"icon check"}),S(d,f)};U(l,d=>{e.multiple&&d(u)})}S(a,s)},children:(a,s)=>{var l=X(),u=M(l);Ue(u,()=>e.children??He),S(a,l)},$$slots:{startIcon:!0,default:!0}}),Z(()=>hn(r,1,`wrapper ${n()??""}`,"svelte-1fitgoo")),S(t,r)}var DQ=j('<div role="none"><!></div>');const FQ={hash:"svelte-umbokg",code:".wrapper.svelte-umbokg {display:contents;}.wrapper.svelte-umbokg .listbox {gap:4px;overflow-x:hidden;overflow-y:auto;border-width:0;max-height:calc(100% - var(--sui-focus-ring-width) * 2);}.wrapper.svelte-umbokg .listbox .option button {border-radius:var(--sui-control-medium-border-radius);padding:4px;width:100%;height:auto;transition:none;}.wrapper.svelte-umbokg .listbox .option button:focus-visible {outline-color:transparent;}.wrapper.svelte-umbokg .listbox .option button .preview {flex:none;border-radius:var(--sui-control-medium-border-radius);aspect-ratio:1/1;object-fit:contain;}.wrapper.svelte-umbokg .listbox .name {min-height:calc(var(--sui-font-size-default) * 2);white-space:normal;line-height:var(--sui-line-height-compact);}.wrapper.svelte-umbokg .listbox.grid {display:grid;grid-template-columns:repeat(auto-fill, minmax(160px, 1fr));height:auto;max-height:none;}.wrapper.svelte-umbokg .listbox.grid .option button {flex-direction:column;justify-content:flex-start;}.wrapper.svelte-umbokg .listbox.grid .option button .preview {width:100%;height:auto;}.wrapper.svelte-umbokg .listbox.grid .option button .name {flex:none;margin:4px 0 12px;padding:0 8px;width:100%;min-height:calc(var(--sui-font-size-default) * 3);}.wrapper.svelte-umbokg .listbox.grid button[aria-selected=true] {outline-offset:-2px;outline-width:2px !important;outline-style:solid;outline-color:var(--sui-primary-accent-color-light);}.wrapper.svelte-umbokg :not(.wrapper.show-title) .listbox.grid .option .name {position:absolute;inset-inline-start:-99999px;}.wrapper.svelte-umbokg .listbox.list .option button {gap:16px;}.wrapper.svelte-umbokg .listbox.list .option button .preview {width:64px;}.wrapper.svelte-umbokg .listbox.list .option button .name {flex:auto;padding-inline:0 8px;}.wrapper.svelte-umbokg .listbox.list .option button[aria-selected=true] {outline-offset:-2px;outline-width:2px !important;outline-style:solid;outline-color:var(--sui-primary-accent-color-light);}"};function kR(t,e){ae(e,!0),ke(t,FQ);const n=()=>H(ce,"$_",r),[r,i]=ve();let o=N(e,"viewType",3,"grid"),a=N(e,"gridId",3,void 0),s=N(e,"multiple",3,!1),l=N(e,"showTitle",3,!1),u=N(e,"onChange",3,void 0),d=N(e,"children",3,void 0);var f=DQ();let h;var p=F(f);{let g=_(()=>n()("assets_dialog.available_images"));vd(p,{get id(){return a()},get class(){return o()},get multiple(){return s()},get"aria-label"(){return c(g)},onChange:m=>{u()?.(m.detail)},children:(m,v)=>{var b=X(),y=M(b);Ue(y,()=>d()??He),S(m,b)},$$slots:{default:!0}})}Z(()=>h=hn(f,1,"wrapper svelte-umbokg",null,h,{"show-title":l()})),S(t,f),se(),i()}var zQ=j('<span role="none" class="name"> </span>'),jQ=j("<!> <!>",1),UQ=j('<span role="alert"> </span>'),BQ=j('<span role="alert"> </span>'),qQ=j('<span role="alert"> </span>'),HQ=j('<div role="none" class="input-outer svelte-mqll9n"><!></div>'),KQ=j('<div role="none" class="input-outer svelte-mqll9n"><!></div> <div role="none" class="input-outer svelte-mqll9n"><!></div> <div role="none" class="input-outer svelte-mqll9n"><!></div>',1),VQ=j('<p role="alert" class="svelte-mqll9n"><!> <!></p> <!> <!>',1),GQ=j('<span role="alert"> </span>'),WQ=j("<!> <!>",1),YQ=j("<!> <!>",1);const JQ={hash:"svelte-mqll9n",code:"p.svelte-mqll9n {margin:0 0 8px;}.input-outer.svelte-mqll9n {width:400px;max-width:100%;text-align:center;}"};function XQ(t,e){ae(e,!0),ke(t,JQ);const n=()=>H(Iu,"$selectAssetsView",a),r=()=>H(ht,"$prefs",a),i=()=>H(mn,"$isSmallScreen",a),o=()=>H(ce,"$_",a),[a,s]=ve(),l=fe=>{kR(fe,{get viewType(){return c(O)},get gridId(){return p()},get multiple(){return f()},children:(be,Oe)=>{{const je=(Ie,Pe=He)=>{var $e=X(),Ee=M($e);En(Ee,Rt,null,qe=>{const Ke=_(()=>{const{id:lt,previewURL:Te,description:Me,kind:pe}=Pe();return{id:lt,previewURL:Te,description:Me,_kind:pe}});{let lt=_(()=>de(Pe()));xR(qe,{get value(){return c(Ke).id},get viewType(){return c(O)},get multiple(){return f()},get selected(){return c(lt)},onChange:({detail:{selected:Te}})=>{he(Pe(),Te)},children:(Te,Me)=>{var pe=jQ(),Le=M(pe);xa(Le,{get kind(){return c(Ke)._kind},get src(){return c(Ke).previewURL},variant:"tile",crossorigin:"anonymous"});var Ne=z(Le,2);{var nt=We=>{var Ze=zQ(),st=F(Ze);Z(()=>ne(st,c(Ke).description)),S(We,Ze)};U(Ne,We=>{(!i()||c(O)==="list")&&We(nt)})}S(Te,pe)},$$slots:{default:!0}})}}),S(Ie,$e)};let Re=_(()=>c(Y)??[]);_c(be,{get items(){return c(Re)},itemKey:"id",renderItem:je,$$slots:{renderItem:!0}})}},$$slots:{default:!0}})};let u=N(e,"kind",3,"image"),d=N(e,"fieldConfig",3,void 0),f=N(e,"multiple",3,!1),h=N(e,"searchTerms",3,""),p=N(e,"gridId",3,void 0),g=N(e,"selectedResources",31,()=>At([]));const m=_(()=>at(e.serviceProps.serviceType,"stock_assets")),v=_(()=>at(e.serviceProps.serviceId,"")),b=_(()=>at(e.serviceProps.serviceLabel,"")),y=_(()=>at(e.serviceProps.hotlinking,!1)),w=_(()=>at(e.serviceProps.authType,"api_key")),x=_(()=>at(e.serviceProps.developerURL,"")),E=_(()=>at(e.serviceProps.apiKeyURL,"")),$=_(()=>e.serviceProps.apiKeyPattern),A=_(()=>e.serviceProps.init),k=_(()=>e.serviceProps.signIn),T=_(()=>e.serviceProps.list),C=_(()=>e.serviceProps.search),P=_(()=>e.serviceProps.upload),O=_(()=>n()?.type),I=At({userName:"",password:""});let L=ie(!0),D=ie(!1),B=ie(""),K=ie(""),G=ie(""),W=ie("initial"),Y=ie(null),R=ie(void 0),q=ie(At({show:!1,status:"info",length:0}));const J=_(()=>({kind:u(),fieldConfig:d(),apiKey:c(B),userName:c(K),password:c(G)}));let Q=0;const ee=async(fe="")=>{V(Y,null),fe=fe.trim();try{V(Y,await(fe?c(C)?.(fe,c(J)):c(T)?.(c(J)))??[],!0)}catch(be){V(R,"search_fetch_failed"),console.error(be)}},re=async fe=>{if(c(P)){V(q,{show:!0,status:"info",length:fe.length},!0);try{await c(P)(fe,c(J)),ee()}catch{V(q,{show:!0,status:"error",length:fe.length},!0)}}},te=async fe=>{const{downloadURL:be,fileName:Oe,credit:je}=fe;if(c(y))return{url:be,credit:je};try{const Re=await fetch(be),{ok:Ie,status:Pe}=Re;if(!Ie)throw new Error(`The response returned with HTTP status ${Pe}.`);const $e=await Re.blob(),Ee=new File([$e],Oe,{type:$e.type});return{url:be,credit:je,file:Ee}}catch(Re){V(R,"image_fetch_failed"),console.error(Re)}},de=fe=>g().some(be=>be.url===fe.downloadURL),he=async(fe,be)=>{const Oe=g().filter(je=>je.url!==fe.downloadURL);if(be){const je=await te(fe);je&&g([...Oe,je])}else g(Oe)};Vt(()=>{(async()=>(typeof c(A)=="function"&&(V(L,!1),V(L,await c(A)(),!0)),c(L)&&(V(B,r().apiKeys?.[c(v)]??"",!0),(fe=>{var be=ho(fe,2);V(K,be[0],!0),V(G,be[1],!0)})((r().logins?.[c(v)]??"").split(" ")),V(D,!!c(B)||!!c(G),!0),V(Y,null))))()}),ze(()=>{h(),c(D),xe(()=>{window.clearTimeout(Q),Q=window.setTimeout(()=>{c(D)&&ee(h())},1e3)})});var ue={uploadFiles:re},ge=YQ(),ye=M(ge);{var me=fe=>{var be=X(),Oe=M(be);{var je=Ie=>{cr(Ie,{children:(Pe,$e)=>{var Ee=UQ(),qe=F(Ee);Z(Ke=>ne(qe,Ke),[()=>o()(`assets_dialog.error.${c(R)}`)]),S(Pe,Ee)},$$slots:{default:!0}})},Re=Ie=>{var Pe=X(),$e=M(Pe);{var Ee=Ke=>{cr(Ke,{children:(lt,Te)=>{var Me=BQ(),pe=F(Me);Z(Le=>ne(pe,Le),[()=>o()("searching")]),S(lt,Me)},$$slots:{default:!0}})},qe=Ke=>{var lt=X(),Te=M(lt);{var Me=Le=>{cr(Le,{children:(Ne,nt)=>{var We=qQ(),Ze=F(We);Z(st=>ne(Ze,st),[()=>o()("no_files_found")]),S(Ne,We)},$$slots:{default:!0}})},pe=Le=>{var Ne=X(),nt=M(Ne);{var We=st=>{{let _t=_(()=>d()?.accept);Pd(st,{get accept(){return c(_t)},get multiple(){return f()},onDrop:({files:Ft})=>re(Ft),children:(Ft,ln)=>{l(Ft)},$$slots:{default:!0}})}},Ze=st=>{l(st)};U(nt,st=>{c(P)?st(We):st(Ze,!1)},!0)}S(Le,Ne)};U(Te,Le=>{c(Y).length?Le(pe,!1):Le(Me)},!0)}S(Ke,lt)};U($e,Ke=>{c(Y)?Ke(qe,!1):Ke(Ee)},!0)}S(Ie,Pe)};U(Oe,Ie=>{c(R)?Ie(je):Ie(Re,!1)})}S(fe,be)},Ae=fe=>{var be=X(),Oe=M(be);{var je=Ie=>{cr(Ie,{children:(Pe,$e)=>{var Ee=VQ(),qe=M(Ee),Ke=F(qe);{var lt=We=>{var Ze=X(),st=M(Ze);_r(st,()=>Qr.sanitize(o()("prefs.media.stock_photos.description",{values:{service:c(b),homeHref:`href="${c(x)}"`,apiKeyHref:`href="${c(E)}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})),S(We,Ze)};U(Ke,We=>{c(m)==="stock_assets"&&We(lt)})}var Te=z(Ke,2);{var Me=We=>{var Ze=X(),st=M(Ze);_r(st,()=>Qr.sanitize(o()(`cloud_storage.${c(v)}.auth.${c(W)}`,{default:o()(`cloud_storage.auth.${c(w)}.${c(W)}`,{values:{service:c(b)}})}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})),S(We,Ze)};U(Te,We=>{c(m)==="cloud_storage"&&We(Me)})}var pe=z(qe,2);{var Le=We=>{var Ze=HQ(),st=F(Ze);{let _t=_(()=>o()("prefs.media.stock_photos.field_label",{values:{service:c(b)}}));Yn(st,{flex:!0,monospace:!0,spellcheck:"false",get"aria-label"(){return c(_t)},oninput:Ft=>{const ln=Ft.target.value.trim();c($)?.test(ln)&&(V(B,ln,!0),V(D,!0),bt(ht,xe(r).apiKeys??={},xe(r)),bt(ht,xe(r).apiKeys[c(v)]=c(B),xe(r)),ee())}})}S(We,Ze)};U(pe,We=>{c(w)==="api_key"&&We(Le)})}var Ne=z(pe,2);{var nt=We=>{var Ze=KQ(),st=M(Ze),_t=F(st);{let Yt=_(()=>o()("user_name")),wt=_(()=>c(W)==="requested");Yn(_t,{flex:!0,spellcheck:"false",get"aria-label"(){return c(Yt)},get disabled(){return c(wt)},get value(){return I.userName},set value(Lt){I.userName=Lt}})}var Ft=z(st,2),ln=F(Ft);{let Yt=_(()=>o()("password")),wt=_(()=>c(W)==="requested");Zg(ln,{get"aria-label"(){return c(Yt)},get disabled(){return c(wt)},get value(){return I.password},set value(Lt){I.password=Lt}})}var qt=z(Ft,2),Et=F(qt);{let Yt=_(()=>o()("sign_in")),wt=_(()=>!I.userName||!I.password||c(W)==="requested");et(Et,{variant:"secondary",get label(){return c(Yt)},get disabled(){return c(wt)},onclick:async()=>{V(W,"requested"),I.userName=I.userName.trim(),I.password=I.password.trim(),await c(k)?.(I.userName,I.password)?(V(W,"success"),V(K,I.userName,!0),V(G,I.password,!0),V(D,!0),bt(ht,xe(r).logins??={},xe(r)),bt(ht,xe(r).logins[c(v)]=[c(K),c(G)].join(" "),xe(r)),ee()):V(W,"error")}})}S(We,Ze)};U(Ne,We=>{c(w)==="password"&&We(nt)})}S(Pe,Ee)},$$slots:{default:!0}})},Re=Ie=>{cr(Ie,{children:(Pe,$e)=>{var Ee=GQ(),qe=F(Ee);Z(Ke=>ne(qe,Ke),[()=>o()("cloud_storage.invalid")]),S(Pe,Ee)},$$slots:{default:!0}})};U(Oe,Ie=>{c(L)?Ie(je):Ie(Re,!1)},!0)}S(fe,be)};U(ye,fe=>{c(D)?fe(me):fe(Ae,!1)})}var Ce=z(ye,2);nr(Ce,{get show(){return c(q).show},set show(fe){c(q).show=fe},children:(fe,be)=>{Hn(fe,{get status(){return c(q).status},children:(Oe,je)=>{var Re=WQ(),Ie=M(Re);{var Pe=qe=>{var Ke=Fe();Z(lt=>ne(Ke,lt),[()=>o()(c(q).length===1?"uploading_file_progress":"uploading_files_progress",{values:{count:c(q).length}})]),S(qe,Ke)};U(Ie,qe=>{c(q).status==="info"&&qe(Pe)})}var $e=z(Ie,2);{var Ee=qe=>{var Ke=Fe();Z(lt=>ne(Ke,lt),[()=>o()(c(q).length===1?"uploading_file_failed":"uploading_files_failed",{values:{count:c(q).length}})]),S(qe,Ke)};U($e,qe=>{c(q).status==="error"&&qe(Ee)})}S(Oe,Re)},$$slots:{default:!0}})},$$slots:{default:!0}}),S(t,ge);var _e=se(ue);return s(),_e}const rp=t=>(t=t.trim(),t?t.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLocaleLowerCase():""),Gc=({value:t,terms:e})=>rp(t).includes(e),w$=(t,e=He)=>{var n=X(),r=M(n);_r(r,()=>Qr.sanitize(e().replace(/([-_.])/g,"$1<wbr>"),{ALLOWED_TAGS:["wbr"]})),S(t,n)};var ZQ=j('<div role="none" class="unsaved svelte-1ong0f1"> </div>'),QQ=j('<strong class="svelte-1ong0f1"><!></strong>'),eee=j("<!>/",1),tee=j('<div role="none" class="unsaved svelte-1ong0f1"> </div>'),nee=j('<span role="none" class="name svelte-1ong0f1"><!> <!></span>'),ree=j("<!> <!> <!>",1),iee=j('<div role="none" class="grid-wrapper svelte-1ong0f1"><!></div>'),oee=j('<span role="none"> </span>');const aee={hash:"svelte-1ong0f1",code:".grid-wrapper.svelte-1ong0f1 {overflow-y:auto;height:100%;}.grid-wrapper.svelte-1ong0f1 [role=listbox] {background-color:transparent;}.grid-wrapper.svelte-1ong0f1 [role=listbox].grid .unsaved {position:absolute;inset-block-start:8px;inset-inline-end:8px;z-index:1;}.grid-wrapper.svelte-1ong0f1 [role=listbox].list .name {display:flex;gap:8px;align-items:center;justify-content:space-between;}.unsaved.svelte-1ong0f1 {display:flex;justify-content:center;align-items:center;border-color:var(--sui-info-border-color);border-radius:4px;padding:2px 6px;color:var(--sui-info-foreground-color);background-color:var(--sui-info-background-color);font-size:var(--sui-font-size-small);}.name.svelte-1ong0f1 {color:var(--sui-tertiary-foreground-color);}.name.svelte-1ong0f1 strong:where(.svelte-1ong0f1) {color:var(--sui-primary-foreground-color);font-weight:var(--sui-font-weight-normal);}"};function SR(t,e){ae(e,!0),ke(t,aee);const n=()=>H(ce,"$_",i),r=()=>H(mn,"$isSmallScreen",i),[i,o]=ve();let a=N(e,"multiple",3,!1),s=N(e,"assets",19,()=>[]),l=N(e,"viewType",3,"grid"),u=N(e,"searchTerms",3,""),d=N(e,"basePath",3,void 0),f=N(e,"gridId",3,void 0),h=N(e,"checkerboard",3,!1),p=N(e,"selectedResources",31,()=>At([])),g=N(e,"onSelect",3,void 0);const m=_(()=>(u()?s().filter(({name:$})=>rp($).includes(u())):s()).filter(($,A,k)=>k.findIndex(T=>T.path===$.path)===A)),v=$=>p().some(A=>fn(A.asset,$)),b=($,A)=>{const k=p().filter(T=>!fn(T.asset,$));A?(p([...k,{asset:$}]),g()?.({asset:$})):p(k)};var y=X(),w=M(y);{var x=$=>{var A=iee(),k=F(A);kR(k,{get multiple(){return a()},get gridId(){return f()},get viewType(){return l()},showTitle:!0,children:(T,C)=>{_c(T,{get items(){return c(m)},itemKey:"path",renderItem:(O,I=He)=>{var L=X(),D=M(L);En(D,Rt,null,B=>{const K=_(()=>{const{kind:Y,name:R,path:q,unsaved:J,folder:Q}=I();return{kind:Y,name:R,path:q,unsaved:J,folder:Q}}),G=_(()=>d()&&!c(K).folder.entryRelative?on(c(K).path.replace(d(),"")):c(K).name),W=_(()=>c(G).split("/"));{let Y=_(()=>v(I()));xR(B,{get value(){return c(K).path},get viewType(){return l()},get multiple(){return a()},get selected(){return c(Y)},onChange:({detail:{selected:R}})=>{b(I(),R)},children:(R,q)=>{var J=ree(),Q=M(J);{var ee=he=>{var ue=ZQ(),ge=F(ue);Z(ye=>ne(ge,ye),[()=>n()("assets_dialog.unsaved")]),S(he,ue)};U(Q,he=>{l()==="grid"&&c(K).unsaved&&he(ee)})}var re=z(Q,2);xa(re,{get kind(){return c(K).kind},get asset(){return I()},variant:"tile",get checkerboard(){return h()}});var te=z(re,2);{var de=he=>{var ue=nee(),ge=F(ue);Ur(ge,{lines:2,children:(Ae,Ce)=>{var _e=X(),fe=M(_e);rt(fe,17,()=>c(W),yr,(be,Oe,je)=>{var Re=X(),Ie=M(Re);{var Pe=Ee=>{var qe=QQ(),Ke=F(qe);w$(Ke,()=>c(Oe)),S(Ee,qe)},$e=Ee=>{var qe=eee(),Ke=M(qe);w$(Ke,()=>c(Oe)),S(Ee,qe)};U(Ie,Ee=>{je===c(W).length-1?Ee(Pe):Ee($e,!1)})}S(be,Re)}),S(Ae,_e)},$$slots:{default:!0}});var ye=z(ge,2);{var me=Ae=>{var Ce=tee(),_e=F(Ce);Z(fe=>ne(_e,fe),[()=>n()("assets_dialog.unsaved")]),S(Ae,Ce)};U(ye,Ae=>{l()==="list"&&c(K).unsaved&&Ae(me)})}S(he,ue)};U(te,he=>{(!r()||l()==="list")&&he(de)})}S(R,J)},$$slots:{default:!0}})}}),S(O,L)},$$slots:{renderItem:!0}})},$$slots:{default:!0}}),S($,A)},E=$=>{cr($,{children:(A,k)=>{var T=oee(),C=F(T);Z(P=>ne(C,P),[()=>n()("no_files_found")]),S(A,T)},$$slots:{default:!0}})};U(w,$=>{c(m).length?$(x):$(E,!1)})}S(t,y),se(),o()}function see(t,e){ae(e,!0);const n=()=>H(Iu,"$selectAssetsView",r),[r,i]=ve();let o=N(e,"multiple",3,!1),a=N(e,"accept",3,void 0),s=N(e,"assets",19,()=>[]),l=N(e,"searchTerms",3,""),u=N(e,"basePath",3,void 0),d=N(e,"selectedResources",31,()=>At([])),f=ie(void 0);ze(()=>{d().length||xe(()=>{c(f)?.reset()})}),St(Pd(t,{get multiple(){return o()},get accept(){return a()},get onDrop(){return e.onDrop},children:(h,p)=>{{let g=_(()=>n()?.type);SR(h,{get multiple(){return o()},get assets(){return s()},get viewType(){return c(g)},get searchTerms(){return l()},get basePath(){return u()},gridId:"select-assets-grid",checkerboard:!0,get selectedResources(){return d()},set selectedResources(m){d(m)}})}},$$slots:{default:!0}}),h=>V(f,h,!0),()=>c(f)),se(),i()}const x$=async({draft:t,file:e})=>{const n=await zl(e);let r;return await Promise.all(Object.entries(t.files??{}).map(async([i,o])=>{!r&&await zl(o.file)===n&&(r=i)})),r},ER=async({file:t,blobURL:e,folder:n,targetFolderPath:r})=>{const{name:i,size:o}=t;return{unsaved:!0,file:t,blobURL:e??URL.createObjectURL(t),name:i,path:r?`${r}/${i}`:i,sha:await Bl(t),size:o,kind:sd(i),folder:n}},TR=async({draft:t,targetFolderPath:e})=>Promise.all(Object.entries(t.files).map(async([n,{file:r,folder:i}])=>ER({file:r,blobURL:n,folder:i,targetFolderPath:e}))),lee=async({draft:t,resource:e,libraryConfig:n})=>{const{transformations:r,max_file_size:i}=n??{},{url:o,credit:a}=e;let{asset:s,file:l}=e,u="",d;if(l){const f=await x$({draft:t,file:l});if(f)u=f;else{r&&(l=await rL(l,r));const h=await Bl(l),{folder:p}=e,g=[...oe(Wn),...await TR({draft:t})].find(m=>m.sha===h&&fn(m.folder,p));g?(s=g,l=void 0):l.size>i?(d=l.name,l=void 0):(u=URL.createObjectURL(l),t.files[u]={file:l,folder:p})}}return s&&(s.unsaved?s.file&&(u=await x$({draft:t,file:s.file})):u=Wf(s,{pathOnly:!0,allowSpecial:!0,entry:t.originalEntry})),o&&!l&&!s&&(u=o),{value:u,credit:a?Qr.sanitize(a,{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href"]}):"",oversizedFileName:d}},uw=(t=oe(Pt))=>t?.media_libraries?.uploadcare??(t?.media_library?.name==="uploadcare"?t?.media_library:void 0),$1=()=>uw()?.config?.publicKey,cee=()=>!!$1(),$R=(t,{fieldConfig:e}={})=>{const{settings:{autoFilename:n=!1,defaultOperations:r=void 0}={},config:{cdnBase:i=void 0}={}}=uw(e)??uw()??{};return t.map(o=>{const{uuid:a,original_filename:s,original_file_url:l,mime_type:u,datetime_uploaded:d,size:f}=o,h=`${new URL(i??l).origin}/${a}/`;return{id:a,description:s,previewURL:`${h}-/preview/400x400/`,downloadURL:`${h}${r?`-${r}`:""}${n?s:""}`,fileName:s,lastModified:new Date(d),size:f,kind:u.startsWith("image/")?"image":u.startsWith("video/")?"video":"other"}})},AR=async(t,{maxPages:e=10,filter:n}={})=>{const r=$1();if(!r)return Promise.reject(new Error("Uploadcare public key is not configured"));const{kind:i,fieldConfig:o,apiKey:a}=t,s={Accept:"application/vnd.uploadcare-v0.7+json",Authorization:`Uploadcare.Simple ${r}:${a}`},l=new URLSearchParams({limit:"100",ordering:"-datetime_uploaded",stored:"true"}),u=[];let d=`https://api.uploadcare.com/files/?${l}`;for(let f=0;f<e&&d;f+=1){const h=await fetch(d,{headers:s});if(!h.ok)return Promise.reject(new Error(`Failed to fetch files: ${h.statusText}`));const p=await h.json();let{results:g}=p;if(i==="image"&&(g=g.filter(m=>m.is_image)),n&&(g=g.filter(n)),u.push(...g),d=p.next,!d)break;await Rt(50)}return $R(u,{fieldConfig:o})},uee=async t=>AR(t),dee=async(t,e)=>{const n=t.toLowerCase();return AR(e,{filter:i=>i.original_filename.toLowerCase().includes(n)})},fee=async(t,e)=>{const n=new TextEncoder,r=n.encode(String(e)),i=n.encode(t),o=await crypto.subtle.importKey("raw",i,{name:"HMAC",hash:"SHA-256"},!1,["sign"]),a=await crypto.subtle.sign("HMAC",o,r);return Array.from(new Uint8Array(a)).map(l=>l.toString(16).padStart(2,"0")).join("")},hee=async(t,e)=>{if(t.length===0)return[];const n=$1();if(!n)return Promise.reject(new Error("Uploadcare public key is not configured"));const{fieldConfig:r,apiKey:i}=e;if(!i)return Promise.reject(new Error("Uploadcare secret key is not provided"));const o=Math.floor(Date.now()/1e3)+1800,a=await fee(i,o),s=new FormData;s.append("UPLOADCARE_PUB_KEY",n),s.append("UPLOADCARE_STORE","1"),s.append("signature",a),s.append("expire",String(o)),t.forEach(f=>{s.append(Px(f.name),f)});const l=await fetch("https://upload.uploadcare.com/base/",{method:"POST",body:s});if(!l.ok)throw new Error(`Failed to upload files: ${l.statusText}`);const u=await l.json(),d=Object.entries(u).filter(([f])=>!f.startsWith("UPLOADCARE_")).map(([f,h])=>{const p=t.find(v=>v.name===f),g=p?.type||"application/octet-stream",m=g.startsWith("image/");return{uuid:h,original_filename:f,original_file_url:`https://ucarecdn.com/${h}/${f}`,size:p?.size||0,mime_type:g,is_image:m,is_ready:!0,content_info:null,datetime_uploaded:new Date().toISOString(),datetime_stored:new Date().toISOString(),datetime_removed:null}});return $R(d,{fieldConfig:r})},pee={serviceType:"cloud_storage",serviceId:"uploadcare",serviceLabel:"Uploadcare",serviceURL:"https://uploadcare.com/",showServiceLink:!0,hotlinking:!0,authType:"api_key",developerURL:"https://uploadcare.com/docs/",apiKeyURL:"https://app.uploadcare.com/projects/-/api-keys/",apiKeyPattern:/^[a-f0-9]{20}$/,isEnabled:cee,list:uee,search:dee,upload:hee},A1={cloudinary:CQ,uploadcare:pee},k$=["en-US,pt-BR,es-ES,ca-ES,de-DE,it-IT,fr-FR,sv-SE,id-ID,pl-PL,ja-JP,zh-TW,zh-CN,ko-KR,th-TH,nl-NL","hu-HU,vi-VN,cs-CZ,da-DK,fi-FI,uk-UA,el-GR,ro-RO,nb-NO,sk-SK,tr-TR,ru-RU"].join(",").split(","),CR="https://api.pexels.com/v1",PR={per_page:80},gee=()=>{const t=oe(Bt).toLowerCase(),[e]=t.split("-");return k$.find(n=>n.toLowerCase()===t)??k$.find(n=>n.split("-")[0]===e)??"en-US"},OR=t=>t.map(({id:e,url:n,alt:r,src:{large2x:i,medium:o},photographer:a})=>({id:String(e),description:n.match(/\/photo\/(?<alt>.+?)-\d+\/$/)?.groups?.alt.replace(/-/g," ")??r,previewURL:o,downloadURL:i,fileName:`pexels-${a.split(/\s+/).join("-").toLowerCase()}-${e}.jpg`,kind:"image",credit:`<a href="${n}">Photo by ${a} on Pexels</a>`})),mee=async({apiKey:t})=>{const e={Authorization:t},n=new URLSearchParams(PR),r=await fetch(`${CR}/curated?${n}`,{headers:e});if(!r.ok)return Promise.reject();const i=(await r.json()).photos;return OR(i)},vee=async(t,{apiKey:e})=>{const n={Authorization:e},r=new URLSearchParams({...PR,query:t,locale:gee()}),i=[];for(let o=1;o<=2;o+=1){r.set("page",String(o));const a=await fetch(`${CR}/search?${r}`,{headers:n});if(!a.ok)return Promise.reject();const{photos:s,next_page:l}=await a.json();if(i.push(...s),!l)break;await Rt(50)}return OR(i)},_ee={serviceType:"stock_assets",serviceId:"pexels",serviceLabel:"Pexels",serviceURL:"https://www.pexels.com/",showServiceLink:!0,hotlinking:!1,authType:"api_key",developerURL:"https://www.pexels.com/api/",apiKeyURL:"https://www.pexels.com/api/new/",apiKeyPattern:/^[a-zA-Z\d]{56}$/,list:mee,search:vee},bee="cs,da,de,en,es,fr,id,it,hu,nl,no,pl,pt,ro,sk,fi,sv,tr,vi,th,bg,ru,el,ja,ko,zh".split(","),LR="https://pixabay.com/api",IR={image_type:"photo",min_width:1280,safesearch:!0,per_page:150},NR=t=>t.map(({id:e,webformatURL:n,previewURL:r,largeImageURL:i,imageWidth:o,imageHeight:a,pageURL:s,tags:l,user:u})=>({id:String(e),description:l,previewURL:n.replace("_640.",o>a?"_180.":"_340."),downloadURL:i,fileName:r.split("/").pop().replace("_150.","_1280."),kind:"image",credit:`<a href="${s}">Photo by ${u} on Pixabay`})),RR=()=>{const[t]=oe(Bt).toLowerCase().split("-");return bee.includes(t)?t:"en"},yee=async({apiKey:t})=>{const e=new URLSearchParams({...IR,key:t,lang:RR(),editors_choice:String(!0)}),n=await fetch(`${LR}/?${e}`);if(!n.ok)return Promise.reject();const r=(await n.json()).hits;return NR(r)},wee=async(t,{apiKey:e})=>{const n=new URLSearchParams({...IR,key:e,lang:RR(),q:t}),r=await fetch(`${LR}/?${n}`);if(!r.ok)return Promise.reject();const i=(await r.json()).hits;return NR(i)},xee={serviceType:"stock_assets",serviceId:"pixabay",serviceLabel:"Pixabay",serviceURL:"https://pixabay.com/",showServiceLink:!0,hotlinking:!1,authType:"api_key",developerURL:"https://pixabay.com/service/about/api/",apiKeyURL:"https://pixabay.com/api/docs/#api_key",apiKeyPattern:/^\d+-[a-f\d]{25}$/,list:yee,search:wee},S$=["af,sq,am,ar,hy,as,az,bn,ba,eu,bs,bg,yue,ca,lzh,zh-Hans,zh-Hant,hr,cs,da,prs,dv,nl,en,et,fo,fj","fil,fi,fr,fr-ca,gl,ka,de,el,gu,ht,he,hi,mww,hu,is,id,ikt,iu,iu-Latn,ga,it,ja,kn,kk,km,ko,ku,kmr","ky,lo,lv,lt,mk,mg,ms,ml,mt,mi,mr,mn-Cyrl,mn-Mong,my,ne,nb,or,ps,fa,pl,pt,pt-pt,pa,otq,ro,ru,sm","sr-Cyrl,sr-Latn,sk,sl,so,es,sw,sv,ty,ta,tt,te,th,bo,ti,to,tr,tk,uk,hsb,ur,ug,uz,vi,cy,yua,zu"].join(",").split(","),MR="https://api.unsplash.com",E$="utm_source=sveltia-cms&utm_medium=referral",DR={per_page:30},kee=()=>{const t=oe(Bt).toLowerCase(),[e]=t.split("-");return S$.find(n=>n.toLowerCase()===t)??S$.find(n=>n.split("-")[0]===e)??"en"},FR=t=>t.map(({id:e,description:n,alt_description:r,urls:{regular:i,thumb:o},user:{username:a,name:s}})=>({id:String(e),description:[n,r].filter(Boolean).join(" — "),previewURL:o,downloadURL:i,fileName:`${s.split(/\s+/).join("-").toLowerCase()}-${e}-unsplash.jpg`,kind:"image",credit:`Photo by <a href="https://unsplash.com/@${a}?${E$}">${s}</a> on <a href="https://unsplash.com/?${E$}">Unsplash</a>`})),See=async({apiKey:t})=>{const e={Authorization:`Client-ID ${t}`},n=new URLSearchParams(DR),r=await fetch(`${MR}/photos?${n}`,{headers:e});if(!r.ok)return Promise.reject();const i=await r.json();return FR(i)},Eee=async(t,{apiKey:e})=>{const n={Authorization:`Client-ID ${e}`},r=new URLSearchParams({...DR,query:t,lang:kee()}),i=[];for(let o=1;o<=5;o+=1){r.set("page",String(o));const a=await fetch(`${MR}/search/photos?${r}`,{headers:n});if(!a.ok)return Promise.reject();const{results:s,total_pages:l}=await a.json();if(i.push(...s),l===o)break;await Rt(50)}return FR(i)},Tee={serviceType:"stock_assets",serviceId:"unsplash",serviceLabel:"Unsplash",serviceURL:"https://unsplash.com/",showServiceLink:!0,hotlinking:!0,authType:"api_key",developerURL:"https://unsplash.com/developers",apiKeyURL:"https://unsplash.com/oauth/applications",apiKeyPattern:/^[a-zA-Z\d-]{40,}$/,list:See,search:Eee},nm={pexels:_ee,pixabay:xee,unsplash:Tee},zR=({fieldConfig:t}={})=>{const e=QO({libraryName:"stock_assets",fieldConfig:t}),n=Object.keys(nm),{providers:r}=e;return{providers:Array.isArray(r)?r:n}};var $ee=j("<!> <!>",1),Aee=j("<!> <!>",1),Cee=j("<a> </a>"),Pee=j("<!> <!>",1),Oee=j("<!> <!> <!>",1),Lee=j('<div role="none" class="filter-tools svelte-5b1zbe"><!></div>'),Iee=j('<div role="none"> </div> <!>',1),Nee=j('<div role="none" class="wrapper svelte-5b1zbe"><div role="none" class="nav svelte-5b1zbe"><!> <!></div> <div role="none" class="content-pane svelte-5b1zbe"><!> <!> <!></div></div>'),Ree=j("<!> <!>",1);const Mee={hash:"svelte-5b1zbe",code:`.wrapper.svelte-5b1zbe {display:flex;gap:16px;height:60dvh;}
|
|
646
|
+
Respond with JSON only:`,xZ="anthropic",kZ="Anthropic Claude",SZ="Anthropic API",EZ="https://docs.claude.com/en/api/overview",TZ="https://platform.claude.com/settings/keys",$Z=/sk-ant-api03-[a-zA-Z0-9-_]{80,}/,AZ=async({sourceLanguage:t,targetLanguage:e})=>!!Hs(t)&&!!Hs(e),CZ=async(t,{sourceLanguage:e,targetLanguage:n,apiKey:r})=>{const i=Hs(e),o=Hs(n);if(!i)throw new Error("Source locale is not supported.");if(!o)throw new Error("Target locale is not supported.");const a="https://api.anthropic.com/v1/messages",s=gR(i,o),l=mR(t),u={model:"claude-haiku-4-5",max_tokens:4e3,temperature:.3,system:s,messages:[{role:"user",content:l}]};try{const d=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":r,"anthropic-version":"2023-06-01","anthropic-dangerous-direct-browser-access":"true"},body:JSON.stringify(u)});if(!d.ok){const g=await d.json().catch(()=>({}));throw new Error(`Anthropic API error: ${d.status} ${d.statusText}${g.error?.message?` - ${g.error.message}`:""}`)}const f=await d.json();if(!f.content||!Array.isArray(f.content)||!f.content[0])throw new Error("Invalid response format from Anthropic API.");const h=f.content[0].text.trim();let p;try{p=JSON.parse(h)}catch{throw new Error("Failed to parse JSON response from Anthropic API.")}if(!Array.isArray(p))throw new Error("Invalid JSON structure in Anthropic API response.");if(p.length!==t.length){const g=t.length,m=p.length;throw new Error(`Translation count mismatch: expected ${g}, got ${m}`)}return p}catch(d){throw d instanceof Error?d:new Error("Failed to translate text with Anthropic API.")}},PZ={serviceId:xZ,serviceLabel:kZ,apiLabel:SZ,developerURL:EZ,apiKeyURL:TZ,apiKeyPattern:$Z,markdownSupported:!0,availability:AZ,translate:CZ},OZ="google",LZ="Google Cloud Translation",IZ="Cloud Translation API",NZ="https://console.cloud.google.com/apis/library/translate.googleapis.com",RZ="https://console.cloud.google.com/apis/api/translate.googleapis.com/credentials",MZ=/AIza[0-9A-Za-z-_]{35}/,b$=["ab,ace,ach,af,ak,alz,am,ar,as,awa,ay,az","ba,ban,bbc,be,bem,bew,bg,bho,bik,bm,bn,br,bs,bts,btx,bua","ca,ceb,cgg,chm,ckb,cnh,co,crh,crs,cs,cv,cy","da,de,din,doi,dov,dv,dz","ee,el,en,eo,es,et,eu","fa,ff,fi,fil,fj,fr,fr-CA,fr-FR,fy","ga,gaa,gd,gl,gn,gom,gu","ha,haw,he,hi,hil,hmn,hr,hrx,ht,hu,hy","id,ig,ilo,is,it,iw","ja,jv,jw","ka,kk,km,kn,ko,kri,ktu,ku,ky","la,lb,lg,li,lij,lmo,ln,lo,lt,ltg,luo,lus,lv","mai,mak,mg,mi,min,mk,ml,mn,mni-Mtei,mr,ms,ms-Arab,mt,my","ne,new,nl,no,nr,nso,nus,ny","oc,om,or","pa,pa-Arab,pag,pam,pap,pl,ps,pt,pt-BR,pt-PT","qu","rn,ro,rom,ru,rw","sa,scn,sd,sg,shn,si,sk,sl,sm,sn,so,sq,sr,ss,st,su,sv,sw,szl","ta,te,tet,tg,th,ti,tk,tl,tn,tr,ts,tt","ug,uk,ur,uz","vi","xh","yi,yo,yua,yue","zh,zh-CN,zh-TW,zu"].join(",").split(","),tm=t=>{const e=t.replace(/^([a-z]{2,3})[-_]([a-z]{2,4})$/i,(r,i,o)=>`${i.toLowerCase()}-${o.toUpperCase()}`);if(b$.includes(e))return e;if(["zh-HK","zh-MO"].includes(e))return"zh-TW";const[n]=e.split("-");if(b$.includes(n))return n},DZ=async({sourceLanguage:t,targetLanguage:e})=>!!tm(t)&&!!tm(e),FZ=async(t,{sourceLanguage:e,targetLanguage:n,apiKey:r})=>{if(e=tm(e)??"",n=tm(n)??"",!e)throw new Error("Source locale is not supported.");if(!n)throw new Error("Target locale is not supported.");const i="https://translation.googleapis.com/language/translate/v2",o={q:t,source:e,target:n,format:"html"};try{const a=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json","X-goog-api-key":r},body:JSON.stringify(o)});if(!a.ok){const l=await a.json().catch(()=>({}));throw new Error(`Google Translate API error: ${a.status} ${a.statusText}${l.error?.message?` - ${l.error.message}`:""}`)}const{data:s}=await a.json();return s.translations.map(l=>l.translatedText)}catch(a){throw a instanceof Error?a:new Error("Failed to translate text with Google Translate API.")}},vR={serviceId:OZ,serviceLabel:LZ,apiLabel:IZ,developerURL:NZ,apiKeyURL:RZ,apiKeyPattern:MZ,markdownSupported:!1,availability:DZ,translate:FZ},zZ="openai",jZ="OpenAI GPT",UZ="OpenAI API",BZ="https://platform.openai.com/docs/overview",qZ="https://platform.openai.com/api-keys",HZ=/sk-[a-zA-Z0-9-_]{40,}/,KZ=async({sourceLanguage:t,targetLanguage:e})=>!!Hs(t)&&!!Hs(e),VZ=async(t,{sourceLanguage:e,targetLanguage:n,apiKey:r})=>{const i=Hs(e),o=Hs(n);if(!i)throw new Error("Source locale is not supported.");if(!o)throw new Error("Target locale is not supported.");const a="https://api.openai.com/v1/chat/completions",s=gR(i,o),l=mR(t),u={model:"gpt-4o-mini",messages:[{role:"system",content:s},{role:"user",content:l}],temperature:.3,max_tokens:4e3};try{const d=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`},body:JSON.stringify(u)});if(!d.ok){const g=await d.json().catch(()=>({}));throw new Error(`OpenAI API error: ${d.status} ${d.statusText}${g.error?.message?` - ${g.error.message}`:""}`)}const f=await d.json();if(!f.choices||!f.choices[0]||!f.choices[0].message)throw new Error("Invalid response format from OpenAI API.");const h=f.choices[0].message.content.trim();let p;try{p=JSON.parse(h)}catch{throw new Error("Failed to parse JSON response from OpenAI API.")}if(!Array.isArray(p))throw new Error("Invalid JSON structure in OpenAI API response.");if(p.length!==t.length){const g=t.length,m=p.length;throw new Error(`Translation count mismatch: expected ${g}, got ${m}`)}return p}catch(d){throw d instanceof Error?d:new Error("Failed to translate text with OpenAI API.")}},GZ={serviceId:zZ,serviceLabel:jZ,apiLabel:UZ,developerURL:BZ,apiKeyURL:qZ,apiKeyPattern:HZ,markdownSupported:!0,availability:KZ,translate:VZ},S1={google:vR,anthropic:PZ,openai:GZ},xv=sn([ht],([t])=>{const{defaultTranslationService:e="google"}=t;return S1[e]??vR}),_R=new em({headingStyle:"atx",bulletListMarker:"-",codeBlockStyle:"fenced"});_R.keep(["span","div"]);const WZ=({draft:t,options:e})=>{const{collectionName:n,fileName:r,currentValues:i,isIndexFile:o}=t,{sourceLanguage:a,targetLanguage:s,keyPath:l="",translate:u=!1}=e,d=i[a],f={collectionName:n,fileName:r,valueMap:d,isIndexFile:o};return Object.fromEntries(Object.entries(d).map(([h,p])=>{const g=i[s][h],m=gn({...f,keyPath:h}),v=m?.widget??"string";return l&&!h.startsWith(l)||typeof p!="string"||!p||!["markdown","text","string","list"].includes(v)||v==="list"&&hd(m).hasSubFields||!u&&p===g||!l&&u&&g?null:[h,{value:p,isMarkdown:v==="markdown"}]}).filter(h=>!!h))},If=(t,e,{count:n,sourceLanguage:r})=>{_y.set({id:Date.now(),show:!0,status:t,message:e,count:n,sourceLanguage:r})},YZ=async({currentValues:t,options:e,copingFieldMap:n})=>{const{serviceId:r,markdownSupported:i,translate:o}=oe(xv),{sourceLanguage:a,targetLanguage:s}=e,l=Object.keys(n).length,u=l===1?"one":"many",d=oe(ht).apiKeys?.[r]||await new Promise(f=>{sf.set({show:!0,multiple:l>1,resolve:f})});if(d){If("info","translation.started",{count:l,sourceLanguage:a});try{const f=await o(Object.entries(n).map(([,{value:h,isMarkdown:p}])=>p&&!i?Yx(h):h),{apiKey:d,sourceLanguage:a,targetLanguage:s});Object.entries(n).forEach(([h,{isMarkdown:p}],g)=>{const m=f[g];t[s][h]=p&&!i?_R.turndown(m):m}),If("success",`translation.complete.${u}`,{count:l,sourceLanguage:a})}catch(f){If("error","translation.error",{count:l,sourceLanguage:a}),console.error(f)}}},JZ=({currentValues:t,options:e,copingFieldMap:n})=>{const{sourceLanguage:r,targetLanguage:i}=e,o=Object.keys(n).length,a=o===1?"one":"many";Object.entries(n).forEach(([s,{value:l}])=>{t[i][s]=l}),If("success",`copy.complete.${a}`,{count:o,sourceLanguage:r})},bR=async t=>{const{sourceLanguage:e,translate:n=!1}=t,r=oe(Xe),{currentValues:i}=r,o=WZ({draft:r,options:t}),a=Object.keys(o).length;if(!a){If("info",`${n?"translation":"copy"}.none`,{count:a,sourceLanguage:e});return}n?await YZ({currentValues:i,options:t,copingFieldMap:o}):JZ({currentValues:i,options:t,copingFieldMap:o}),Xe.update(s=>({...s,currentValues:i}))};function E1(t,e){ae(e,!0);const n=()=>H(Xe,"$entryDraft",o),r=()=>H(xv,"$translator",o),i=()=>H(ce,"$_",o),[o,a]=ve();let s=N(e,"keyPath",3,""),l=N(e,"translate",3,!1);const u=async({sourceLanguage:h,targetLanguage:p})=>!n()?.currentLocales[p]||!n().currentLocales[h]||!!s()&&!Kn(n().currentValues[h])[s()]||!l()&&!!s()&&Kn(n().currentValues[h])[s()]===Kn(n().currentValues[p])[s()]||l()&&!await r()?.availability({sourceLanguage:h,targetLanguage:p});var d=X(),f=M(d);rt(f,17,()=>e.otherLocales,yr,(h,p)=>{const g=_(()=>({sourceLanguage:c(p),targetLanguage:e.locale}));var m=X(),v=M(m);En(v,()=>u(c(g)),null,(b,y)=>{{let w=_(()=>i()(l()?"translate_from_x":"copy_from_x",{values:{locale:Uo(c(p))}}));vt(b,{get label(){return c(w)},get disabled(){return c(y)},onclick:()=>{bR({...c(g),keyPath:s(),translate:l()})}})}}),S(h,m)}),S(t,d),se(),a()}var XZ=j("<section><!></section>");const ZZ={hash:"svelte-wzztxu",code:"section.svelte-wzztxu {padding:var(--field-editor-padding);}section.svelte-wzztxu:not(:last-child) {border-width:0 0 1px;border-color:var(--sui-secondary-border-color);}section.svelte-wzztxu > * {margin-inline:auto !important;max-width:768px;}section.svelte-wzztxu > header {display:flex;align-items:center;margin:0 -8px 8px;height:var(--sui-button-small-height);}section.svelte-wzztxu > header h4 {margin-inline:8px 0;font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-bold);color:var(--sui-secondary-foreground-color);}section.svelte-wzztxu > header .required {margin-block:2px 0;margin-inline:2px 0;color:var(--sui-error-foreground-color);font-size:var(--sui-font-size-large);}"};function yR(t,e){ke(t,ZZ);let n=N(e,"children",3,void 0),r=ot(e,["$$slots","$$events","$$legacy","children"]);var i=XZ();mt(i,()=>({role:"group",class:"field",...r}),void 0,void 0,void 0,"svelte-wzztxu");var o=F(i);Ue(o,()=>n()??He),S(t,i)}function wR(t,e){ae(e,!0);const n=()=>H(Xe,"$entryDraft",o),r=()=>H(xv,"$translator",o),i=()=>H(ce,"$_",o),[o,a]=ve();let s=N(e,"size",3,"medium"),l=N(e,"keyPath",3,"");const u=_(()=>!n()?.currentLocales[e.locale]),d=async({sourceLanguage:m,targetLanguage:v})=>c(u)||!n()?.currentLocales[m]||!await r()?.availability({sourceLanguage:m,targetLanguage:v});var f=X(),h=M(f);{var p=m=>{const v=_(()=>{const[E]=e.otherLocales;return{otherLocale:E}}),b=_(()=>i()("translate_from_x",{values:{locale:Uo(c(v).otherLocale)??c(v).otherLocale}})),y=_(()=>({sourceLanguage:c(v).otherLocale,targetLanguage:e.locale}));var w=X(),x=M(w);En(x,()=>d(c(y)),null,(E,$)=>{et(E,{variant:"ghost",get size(){return s()},iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return c(b)},get title(){return c(b)},get disabled(){return c($)},onclick:()=>{bR({...c(y),keyPath:l(),translate:!0})},startIcon:k=>{Qe(k,{name:"translate"})},$$slots:{startIcon:!0}})}),S(m,w)},g=m=>{{const v=w=>{Qe(w,{name:"translate"})},b=w=>{{let x=_(()=>i()("translation_options"));xr(w,{get"aria-label"(){return c(x)},children:(E,$)=>{E1(E,{get locale(){return e.locale},get otherLocales(){return e.otherLocales},get keyPath(){return l()},translate:!0})},$$slots:{default:!0}})}};let y=_(()=>i()("translate"));ei(m,{variant:"ghost",get size(){return s()},iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return c(y)},get disabled(){return c(u)},endIcon:v,popup:b,$$slots:{endIcon:!0,popup:!0}})}};U(h,m=>{e.otherLocales.length===1?m(p):m(g,!1)})}S(t,f),se(),a()}var QZ=j('<div role="alert" class="validation svelte-6wra4i" aria-live="polite"><div role="none" class="svelte-6wra4i"><!> <!></div></div>');const eQ={hash:"svelte-6wra4i",code:".validation.svelte-6wra4i {color:var(--sui-error-foreground-color) !important;font-size:var(--sui-font-size-small);}.validation.svelte-6wra4i div:where(.svelte-6wra4i) {display:flex;align-items:center;gap:4px;margin:4px 0;}.validation.svelte-6wra4i div:where(.svelte-6wra4i) .icon {flex:none;font-size:16px; /* !hardcoded */}"};function T1(t,e){ke(t,eQ);var n=QZ(),r=F(n),i=F(r);Qe(i,{name:"error"});var o=z(i,2);Ue(o,()=>e.children),Z(()=>Se(n,"id",e.id)),S(t,n)}function tQ(t,e){ae(e,!0);let n=N(e,"currentValue",15),r=N(e,"required",3,!0),i=N(e,"readonly",3,!1),o=N(e,"invalid",3,!1);w0(t,{get readonly(){return i()},get required(){return r()},get invalid(){return o()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get checked(){return n()},set checked(a){n(a)}}),se()}var nQ=j("<p> </p>");function rQ(t,e){ae(e,!0);const n=()=>H(ce,"$_",r),[r,i]=ve();let o=N(e,"currentValue",3,!1);var a=X(),s=M(a);{var l=u=>{var d=nQ(),f=F(d);Z(h=>ne(f,h),[()=>n()(`boolean.${o()}`)]),S(u,d)};U(s,u=>{typeof o()=="boolean"&&u(l)})}S(t,a),se(),i()}function iQ(t,e){ae(e,!0);const n=()=>H(Xe,"$entryDraft",r),[r,i]=ve(),{valueStoreKey:o="currentValues"}=pr("field-editor")??{};let a=N(e,"currentValue",15),s=N(e,"required",3,!0),l=N(e,"readonly",3,!1),u=N(e,"invalid",3,!1),d=ie(""),f=ie("");const h=_(()=>at(e.fieldConfig.default_language,"")),p=_(()=>at(e.fieldConfig.allow_language_selection,!0)),g=_(()=>at(e.fieldConfig.output_code_only,!1)),m=_(()=>at(e.fieldConfig.keys,()=>({code:"code",lang:"lang"}),!0)),v=_(()=>Kn(n()?.[o][e.locale])??{}),b=_(()=>`${e.keyPath}.${c(m).code}`),y=_(()=>`${e.keyPath}.${c(m).lang}`),w=()=>{if(c(g))typeof a()!="string"?V(d,""):c(d)!==a()&&V(d,a(),!0);else{const A=c(v)[c(b)],k=c(v)[c(y)]||c(h);typeof A!="string"?V(d,""):c(d)!==A&&V(d,A,!0),typeof k!="string"?V(f,""):c(f)!==k&&V(f,k,!0)}},x=()=>{c(g)?a()!==c(d)&&a(c(d)):n()&&(a({}),c(v)[c(b)]!==c(d)&&bt(Xe,xe(n)[o][e.locale][c(b)]=c(d),xe(n)),c(v)[c(y)]!==c(f)&&bt(Xe,xe(n)[o][e.locale][c(y)]=c(f),xe(n)))};ze(()=>{c(v),xe(()=>{w()})}),ze(()=>{c(d),c(f),xe(()=>{x()})});var E=X(),$=M(E);En($,Rt,null,A=>{var k=X(),T=M(k);fr(T,()=>JSON.stringify(e.fieldConfig),C=>{ZG(C,{get showLanguageSwitcher(){return c(p)},flex:!0,get readonly(){return l()},get required(){return s()},get invalid(){return u()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get code(){return c(d)},set code(P){V(d,P,!0)},get lang(){return c(f)},set lang(P){V(f,P,!0)}})}),S(A,k)}),S(t,E),se(),i()}var oQ=j("<pre> </pre>");function aQ(t,e){ae(e,!0);const n=()=>H(Xe,"$entryDraft",r),[r,i]=ve(),o=_(()=>at(e.fieldConfig.default_language,"")),a=_(()=>at(e.fieldConfig.output_code_only,!1)),s=_(()=>at(e.fieldConfig.keys,()=>({code:"code",lang:"lang"}),!0)),l=_(()=>Kn(n()?.currentValues[e.locale])??{}),u=_(()=>`${e.keyPath}.${c(s).code}`),d=_(()=>`${e.keyPath}.${c(s).lang}`),f=_(()=>c(a)?e.currentValue:c(l)[c(u)]),h=_(()=>c(a)?c(o):c(l)[c(d)]);var p=X(),g=M(p);{var m=v=>{var b=oQ(),y=F(b);Z(()=>{hn(b,1,yC(c(h)?`language-${c(h)}`:void 0)),ne(y,c(f))}),S(v,b)};U(g,v=>{c(f)&&v(m)})}S(t,p),se(),i()}var sQ=j(" <!>",1),lQ=j('<span role="none" class="value svelte-1usff15"><!> <!></span>'),cQ=j('<div role="none" class="svelte-1usff15"><input type="color" class="svelte-1usff15"/> <!> <!></div>');const uQ={hash:"svelte-1usff15",code:"div.svelte-1usff15 {display:flex;align-items:center;gap:8px;}div.svelte-1usff15 .value:where(.svelte-1usff15) {display:flex;align-items:center;gap:8px;}div.svelte-1usff15 .value:where(.svelte-1usff15) .sui.text-input {width:88px;min-width:0;}div.svelte-1usff15 .value:where(.svelte-1usff15) .sui.slider {padding:8px;--sui-slider-base-width: 80px;}input.svelte-1usff15 {font-family:var(--sui-textbox-font-family);}"};function dQ(t,e){const n=Jn();ae(e,!0),ke(t,uQ);const r=()=>H(ce,"$_",i),[i,o]=ve();let a=N(e,"currentValue",15),s=N(e,"required",3,!0),l=N(e,"readonly",3,!1),u=N(e,"invalid",3,!1),d=ie(""),f=ie(255);const h=_(()=>at(e.fieldConfig.allowInput,!1)),p=_(()=>at(e.fieldConfig.enableAlpha,!1)),g=/^#[0-9a-f]{6}$/i,m=/^(?<rgb>#[0-9a-f]{6})(?<a>[0-9a-f]{2})?$/i,v=()=>{if(typeof a()!="string")return;const{rgb:k,a:T="ff"}=a().match(m)?.groups??{};if(k&&c(d)!==k&&V(d,k,!0),k&&c(p)){const C=Number.parseInt(`0x${T}`,16);c(f)!==C&&V(f,C,!0)}},b=()=>{let k=g.test(c(d))?c(d):"";k&&c(p)&&(k+=c(f).toString(16).padStart(2,"0")),a()!==k&&a(k)};ze(()=>{a(),xe(()=>{v()})}),ze(()=>{c(d),c(f),xe(()=>{b()})});var y=cQ(),w=F(y),x=z(w,2);{var E=k=>{var T=lQ(),C=F(T);{var P=L=>{Yn(L,{get id(){return`${n}-input`},get invalid(){return u()},get readonly(){return l()},get required(){return s()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return c(d)},set value(D){V(d,D,!0)}})};U(C,L=>{c(h)&&L(P)})}var O=z(C,2);{var I=L=>{var D=sQ(),B=M(D),K=z(B);{let G=_(()=>!c(d)),W=_(()=>r()("opacity"));$K(K,{min:0,max:255,get disabled(){return c(G)},get"aria-label"(){return c(W)},get value(){return c(f)},set value(Y){V(f,Y,!0)}})}Z(G=>ne(B,`${G??""} `),[()=>r()("opacity")]),S(L,D)};U(O,L=>{c(p)&&L(I)})}S(k,T)};U(x,k=>{(c(h)||c(p))&&k(E)})}var $=z(x,2);{var A=k=>{{let T=_(()=>r()("clear")),C=_(()=>!c(d)),P=_(()=>`${n}-picker ${c(h)?`${n}-input`:""}`);et(k,{variant:"tertiary",get label(){return c(T)},get disabled(){return c(C)},get"aria-controls"(){return c(P)},onclick:()=>{V(d,""),V(f,255)}})}};U($,k=>{!l()&&!s()&&k(A)})}Z(()=>{Se(w,"id",`${n}-picker`),w.readOnly=l(),Se(w,"aria-invalid",u()),Se(w,"aria-readonly",l()),Se(w,"aria-required",s()),Se(w,"aria-labelledby",`${e.fieldId??""}-label`),Se(w,"aria-errormessage",`${e.fieldId??""}-error`)}),pm(w,()=>c(d),k=>V(d,k)),S(t,y),se(),o()}var fQ=j('<p><span role="none" class="preview svelte-1pgn31g"><span role="none" class="color svelte-1pgn31g"></span> <span role="none" class="value"> </span> <span role="none" class="value"> </span></span></p>');const hQ={hash:"svelte-1pgn31g",code:".preview.svelte-1pgn31g {display:inline-flex;align-items:center;gap:8px;}.preview.svelte-1pgn31g .color:where(.svelte-1pgn31g) {display:block;width:24px;height:24px;border-radius:24px;}"};function pQ(t,e){ae(e,!0),ke(t,hQ);const n=_(()=>at(e.fieldConfig.enableAlpha,!1)),r=u=>Number.parseInt(`0x${u}`,16),i=/^#(?<r>[0-9a-f]{2})(?<g>[0-9a-f]{2})(?<b>[0-9a-f]{2})(?<a>[0-9a-f]{2})?$/i,o=_(()=>{const{r:u,g:d,b:f,a:h}=e.currentValue?.match(i)?.groups??{};return u?`rgb(${r(u)} ${r(d)} ${r(f)}${c(n)&&h?` / ${Math.round(r(h)/255*100)}%`:""})`:""});var a=X(),s=M(a);{var l=u=>{var d=fQ(),f=F(d),h=F(f);let p;var g=z(h,2),m=F(g),v=z(g,2),b=F(v);Z(()=>{p=Co(h,"",p,{"background-color":e.currentValue}),ne(m,e.currentValue),ne(b,c(o))}),S(u,d)};U(s,u=>{typeof e.currentValue=="string"&&e.currentValue.trim()&&u(l)})}S(t,a),se()}function gQ(t,e){ae(e,!0);const n=()=>H(Xe,"$entryDraft",r),[r,i]=ve(),{valueStoreKey:o="currentValues"}=pr("field-editor")??{};let a=N(e,"currentValue",15),s=N(e,"required",3,!0),l=N(e,"readonly",3,!1),u=N(e,"invalid",3,!1);const d=_(()=>at(e.fieldConfig.value,"")),f=_(()=>n()?.isIndexFile??!1),h=_(()=>n()?.collectionName??""),p=_(()=>n()?.fileName),g=_(()=>Kn(n()?.[o][e.locale])??{}),m=_(()=>Hl(e.locale)),v=()=>{const[y]=e.keyPath.split(".").splice(-2,1);return y?.match(/^\d+$/)?Number(y):void 0},b=()=>{if(!Object.keys(c(g)).includes(e.keyPath))return;const y=c(d)==="{{index}}"?v()??"":c(d).replaceAll(/{{(.+?)}}/g,(w,x)=>{if(x==="index")return String(v()??"");if(!x.startsWith("fields."))return"";const E=dd({collectionName:c(h),fileName:c(p),valueMap:c(g),keyPath:x.replace(/^fields\./,""),locale:e.locale,isIndexFile:c(f)});return Array.isArray(E)?c(m).format(E):String(E)});a()!==y&&a(y)};ze(()=>{c(g),xe(()=>{b()})});{let y=_(()=>String(a()));Yn(t,{get value(){return c(y)},flex:!0,get readonly(){return l()},get required(){return s()},get invalid(){return u()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`}})}se(),i()}var mQ=j('<p dir="auto"> </p>');function vQ(t,e){ae(e,!0);var n=mQ(),r=F(n);Z(i=>{Se(n,"lang",i),ne(r,e.currentValue),n.dir=n.dir},[()=>jr(e.locale)]),S(t,n),se()}var _Q=j('<span role="none" class="utc svelte-boo8ot">UTC</span>'),bQ=j('<div role="none" class="svelte-boo8ot"><input/> <!> <!> <!></div>');const yQ={hash:"svelte-boo8ot",code:"div.svelte-boo8ot {display:flex;align-items:center;}.utc.svelte-boo8ot {margin:0 8px;color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);}"};function wQ(t,e){ae(e,!0),ke(t,yQ);const n=()=>H(ce,"$_",r),[r,i]=ve();let o=N(e,"currentValue",15),a=N(e,"required",3,!0),s=N(e,"readonly",3,!1),l=N(e,"invalid",3,!1),u=ie("");const d=_(()=>Js(e.fieldConfig)),f=_(()=>c(d).dateOnly),h=_(()=>c(d).timeOnly),p=_(()=>c(d).utc),g=()=>{const k=JU(o(),e.fieldConfig);k!==void 0&&k!==c(u)&&V(u,k,!0)},m=()=>{const k=qP(c(u),o(),e.fieldConfig);k!==void 0&&k!==o()&&Number(Pu(k,e.fieldConfig))!==Number(Pu(o(),e.fieldConfig))&&o(k)};ze(()=>{o(),xe(()=>{g()})}),ze(()=>{c(u),xe(()=>{m()})});var v=bQ(),b=F(v),y=z(b,2);{var w=k=>{var T=_Q();S(k,T)};U(y,k=>{c(p)&&k(w)})}var x=z(y,2);{var E=k=>{{let T=_(()=>n()(c(f)?"today":"now"));et(k,{variant:"tertiary",get label(){return c(T)},onclick:()=>{const C=BP(e.fieldConfig);V(u,c(p)?C.replace(/:00\.000Z$/,""):C,!0)}})}};U(x,k=>{s()||k(E)})}var $=z(x,2);{var A=k=>{{let T=_(()=>n()("clear")),C=_(()=>!o());et(k,{variant:"tertiary",get label(){return c(T)},get disabled(){return c(C)},onclick:()=>{o("")}})}};U($,k=>{!s()&&!a()&&k(A)})}Z(()=>{Se(b,"type",c(f)?"date":c(h)?"time":"datetime-local"),b.readOnly=s(),Se(b,"aria-readonly",s()),Se(b,"aria-required",a()),Se(b,"aria-invalid",l()),Se(b,"aria-labelledby",`${e.fieldId??""}-label`),Se(b,"aria-errormessage",`${e.fieldId??""}-error`)}),pm(b,()=>c(u),k=>V(u,k)),S(t,v),se(),i()}var xQ=j('<p dir="auto"> <!></p>');function kQ(t,e){ae(e,!0);const n=_(()=>HP({locale:e.locale,fieldConfig:e.fieldConfig,currentValue:e.currentValue}));var r=X(),i=M(r);{var o=a=>{var s=xQ(),l=F(s),u=z(l);{var d=f=>{var h=Fe("UTC");S(f,h)};U(u,f=>{e.fieldConfig.picker_utc&&f(d)})}Z(f=>{Se(s,"lang",f),ne(l,`${c(n)??""} `),s.dir=s.dir},[()=>jr(e.locale)]),S(a,s)};U(i,a=>{c(n)&&a(o)})}S(t,r),se()}const y$="https://console.cloudinary.com",SQ=["cloud_name","api_key","username","timestamp","signature","integration","use_saml","saml_iframe_support"],EQ=["integration","inline_container","z_index","multiple","max_files","default_transformations","insert_caption","remove_header","folder","search","collection","asset","transformation","sandboxNotAllowedAttributes","theme"],cw=t=>{const e=oe(Pt);if(t??=e,t?.media_libraries?.cloudinary)return t.media_libraries.cloudinary;if(!t?.media_library)return;const n=t.media_library.name==="cloudinary",r=!t.media_library.name&&e?.media_library?.name==="cloudinary";if(n||r)return t.media_library},TQ=t=>{const e=cw()??{config:{}},n=cw(t)??{config:{}};return{...e,...n,config:{...e.config,...n.config}}},$Q=()=>{const{cloud_name:t,api_key:e}=cw()?.config??{};return{cloudName:t,apiKey:e}},AQ=()=>{const{cloudName:t,apiKey:e}=$Q();return!!(t&&e)},CQ={serviceType:"cloud_storage",serviceId:"cloudinary",serviceLabel:"Cloudinary",serviceURL:"https://cloudinary.com/",showServiceLink:!0,hotlinking:!0,authType:"widget",developerURL:"https://cloudinary.com/documentation/",apiKeyURL:"https://console.cloudinary.com/settings/api-keys",apiKeyPattern:/^[A-Za-z0-9_-]{15,}$/,isEnabled:AQ};var PQ=j('<!> <div role="none"> </div>',1),OQ=j('<iframe allow="camera; storage-access" class="svelte-p06t0o"></iframe> <!>',1);const LQ={hash:"svelte-p06t0o",code:"iframe.svelte-p06t0o {display:block;width:100%;height:100%;border:none;&[hidden] {display:none;}}"};function IQ(t,e){ae(e,!0),ke(t,LQ);const n=()=>H(ce,"$_",r),[r,i]=ve();let o=N(e,"multiple",3,!1),a=N(e,"hidden",3,!1);const s=_(()=>TQ(e.fieldConfig)??{});let l="",u=ie(!1),d=ie(!1),f=ie(void 0);const h=()=>{if(!c(f))return;l=window.crypto.randomUUID();const x=new URLSearchParams({...Object.fromEntries(Object.entries(c(s).config??{}).filter(([E])=>SQ.includes(E))),ml_id:l,pmHost:window.location.origin,new_cms:"true",remove_header:"true"});c(f).src=`https://console.cloudinary.com/console/media_library/cms?${x}`},p=()=>{const x={...Object.fromEntries(Object.entries(c(s).config??{}).filter(([$])=>EQ.includes($))),multiple:o(),max_files:e.fieldConfig?.max??c(s).config?.max_files??20,folder:{path:c(s).config?.folder?.path??"",resource_type:e.kind??"raw"}},E={type:"ML_WIDGET_SHOW",data:{mlId:l,config:x}};console.debug("Cloudinary Panel sending message:",E),c(f)?.contentWindow?.postMessage(JSON.stringify(E),y$)},g=({assets:x})=>{const{output_filename_only:E=!1,use_transformations:$=!0}=c(s),A=x.map(k=>{const T=k.secure_url;return E?{url:T.split("/").pop()}:$?{url:k.derived?.[0]?.secure_url??T}:{url:T}});e.onSelect(A)},m=({origin:x,data:E})=>{if(x===y$){if(typeof E=="string")try{E=JSON.parse(E)}catch{return}$t(E)&&(console.debug("Cloudinary Panel received message:",E),E.type==="login"&&E.consoleDomain&&V(u,!0),E.type==="consoleLoaded"&&V(d,!0),E.type==="ML_WIDGET_INSERT_DATA"&&g(E.data))}};Vt(()=>(h(),window.addEventListener("message",m),()=>{window.removeEventListener("message",m)})),ze(()=>{c(s)&&c(d)&&p()});var v=OQ(),b=M(v);St(b,x=>V(f,x),()=>c(f));var y=z(b,2);{var w=x=>{cr(x,{children:(E,$)=>{var A=PQ(),k=M(A);{let P=_(()=>n()("cloud_storage.cloudinary.activate.button_label"));et(k,{variant:"primary",get label(){return c(P)},onclick:async()=>{window.open("https://console.cloudinary.com/console/media_library/cms_login?cms=true")}})}var T=z(k,2),C=F(T);Z(P=>ne(C,P),[()=>n()("cloud_storage.cloudinary.activate.description")]),S(E,A)},$$slots:{default:!0}})};U(y,x=>{c(u)||x(w)})}Z(x=>{Se(b,"title",x),Se(b,"hidden",a()||!c(u))},[()=>n()("cloud_storage.cloudinary.iframe_title")]),S(t,v),se(),i()}var NQ=j('<span role="none" class="icon check-background"><!></span>'),RQ=j('<div role="none"><!></div>');const MQ={hash:"svelte-1fitgoo",code:".wrapper.svelte-1fitgoo {display:contents;}.wrapper.svelte-1fitgoo [role=option] {position:relative;}.wrapper.svelte-1fitgoo [role=option] > .icon.check {display:none;}.wrapper.svelte-1fitgoo [role=option][aria-selected=false] .check-background {border-color:var(--sui-checkbox-border-color);background-color:var(--sui-checkbox-background-color);}.wrapper.svelte-1fitgoo [role=option][aria-selected=false] .check-background .icon {display:none;}.wrapper.svelte-1fitgoo [role=option][aria-selected=true] .check-background {border-color:var(--sui-primary-accent-color);color:var(--sui-primary-accent-color-inverted);background-color:var(--sui-primary-accent-color);}.wrapper.svelte-1fitgoo [role=option] .check-background {display:flex;justify-content:center;align-items:center;border-width:1px;border-radius:var(--sui-checkbox-border-radius);width:20px;height:20px;pointer-events:none;}.wrapper.svelte-1fitgoo [role=option] .check-background .icon {color:inherit !important;font-size:20px;}.wrapper.grid.svelte-1fitgoo .check-background {position:absolute;inset-block-start:8px;inset-inline-start:8px;z-index:1;}.wrapper.list.svelte-1fitgoo .check-background {margin-inline-start:16px;}"};function xR(t,e){ke(t,MQ);let n=N(e,"viewType",3,"grid");var r=RQ(),i=F(r);Mr(i,{label:"",get value(){return e.value},get selected(){return e.selected},get onChange(){return e.onChange},startIcon:a=>{var s=X(),l=M(s);{var u=d=>{var f=NQ(),h=F(f);Qe(h,{name:"check",class:"icon check"}),S(d,f)};U(l,d=>{e.multiple&&d(u)})}S(a,s)},children:(a,s)=>{var l=X(),u=M(l);Ue(u,()=>e.children??He),S(a,l)},$$slots:{startIcon:!0,default:!0}}),Z(()=>hn(r,1,`wrapper ${n()??""}`,"svelte-1fitgoo")),S(t,r)}var DQ=j('<div role="none"><!></div>');const FQ={hash:"svelte-umbokg",code:".wrapper.svelte-umbokg {display:contents;}.wrapper.svelte-umbokg .listbox {gap:4px;overflow-x:hidden;overflow-y:auto;border-width:0;max-height:calc(100% - var(--sui-focus-ring-width) * 2);}.wrapper.svelte-umbokg .listbox .option button {border-radius:var(--sui-control-medium-border-radius);padding:4px;width:100%;height:auto;transition:none;}.wrapper.svelte-umbokg .listbox .option button:focus-visible {outline-color:transparent;}.wrapper.svelte-umbokg .listbox .option button .preview {flex:none;border-radius:var(--sui-control-medium-border-radius);aspect-ratio:1/1;object-fit:contain;}.wrapper.svelte-umbokg .listbox .name {min-height:calc(var(--sui-font-size-default) * 2);white-space:normal;line-height:var(--sui-line-height-compact);}.wrapper.svelte-umbokg .listbox.grid {display:grid;grid-template-columns:repeat(auto-fill, minmax(160px, 1fr));height:auto;max-height:none;}.wrapper.svelte-umbokg .listbox.grid .option button {flex-direction:column;justify-content:flex-start;}.wrapper.svelte-umbokg .listbox.grid .option button .preview {width:100%;height:auto;}.wrapper.svelte-umbokg .listbox.grid .option button .name {flex:none;margin:4px 0 12px;padding:0 8px;width:100%;min-height:calc(var(--sui-font-size-default) * 3);}.wrapper.svelte-umbokg .listbox.grid button[aria-selected=true] {outline-offset:-2px;outline-width:2px !important;outline-style:solid;outline-color:var(--sui-primary-accent-color-light);}.wrapper.svelte-umbokg :not(.wrapper.show-title) .listbox.grid .option .name {position:absolute;inset-inline-start:-99999px;}.wrapper.svelte-umbokg .listbox.list .option button {gap:16px;}.wrapper.svelte-umbokg .listbox.list .option button .preview {width:64px;}.wrapper.svelte-umbokg .listbox.list .option button .name {flex:auto;padding-inline:0 8px;}.wrapper.svelte-umbokg .listbox.list .option button[aria-selected=true] {outline-offset:-2px;outline-width:2px !important;outline-style:solid;outline-color:var(--sui-primary-accent-color-light);}"};function kR(t,e){ae(e,!0),ke(t,FQ);const n=()=>H(ce,"$_",r),[r,i]=ve();let o=N(e,"viewType",3,"grid"),a=N(e,"gridId",3,void 0),s=N(e,"multiple",3,!1),l=N(e,"showTitle",3,!1),u=N(e,"onChange",3,void 0),d=N(e,"children",3,void 0);var f=DQ();let h;var p=F(f);{let g=_(()=>n()("assets_dialog.available_images"));vd(p,{get id(){return a()},get class(){return o()},get multiple(){return s()},get"aria-label"(){return c(g)},onChange:m=>{u()?.(m.detail)},children:(m,v)=>{var b=X(),y=M(b);Ue(y,()=>d()??He),S(m,b)},$$slots:{default:!0}})}Z(()=>h=hn(f,1,"wrapper svelte-umbokg",null,h,{"show-title":l()})),S(t,f),se(),i()}var zQ=j('<span role="none" class="name"> </span>'),jQ=j("<!> <!>",1),UQ=j('<span role="alert"> </span>'),BQ=j('<span role="alert"> </span>'),qQ=j('<span role="alert"> </span>'),HQ=j('<div role="none" class="input-outer svelte-mqll9n"><!></div>'),KQ=j('<div role="none" class="input-outer svelte-mqll9n"><!></div> <div role="none" class="input-outer svelte-mqll9n"><!></div> <div role="none" class="input-outer svelte-mqll9n"><!></div>',1),VQ=j('<p role="alert" class="svelte-mqll9n"><!> <!></p> <!> <!>',1),GQ=j('<span role="alert"> </span>'),WQ=j("<!> <!>",1),YQ=j("<!> <!>",1);const JQ={hash:"svelte-mqll9n",code:"p.svelte-mqll9n {margin:0 0 8px;}.input-outer.svelte-mqll9n {width:400px;max-width:100%;text-align:center;}"};function XQ(t,e){ae(e,!0),ke(t,JQ);const n=()=>H(Iu,"$selectAssetsView",a),r=()=>H(ht,"$prefs",a),i=()=>H(mn,"$isSmallScreen",a),o=()=>H(ce,"$_",a),[a,s]=ve(),l=fe=>{kR(fe,{get viewType(){return c(O)},get gridId(){return p()},get multiple(){return f()},children:(be,Oe)=>{{const je=(Ie,Pe=He)=>{var $e=X(),Ee=M($e);En(Ee,Rt,null,qe=>{const Ke=_(()=>{const{id:lt,previewURL:Te,description:Me,kind:pe}=Pe();return{id:lt,previewURL:Te,description:Me,_kind:pe}});{let lt=_(()=>de(Pe()));xR(qe,{get value(){return c(Ke).id},get viewType(){return c(O)},get multiple(){return f()},get selected(){return c(lt)},onChange:({detail:{selected:Te}})=>{he(Pe(),Te)},children:(Te,Me)=>{var pe=jQ(),Le=M(pe);xa(Le,{get kind(){return c(Ke)._kind},get src(){return c(Ke).previewURL},variant:"tile",crossorigin:"anonymous"});var Ne=z(Le,2);{var nt=We=>{var Ze=zQ(),st=F(Ze);Z(()=>ne(st,c(Ke).description)),S(We,Ze)};U(Ne,We=>{(!i()||c(O)==="list")&&We(nt)})}S(Te,pe)},$$slots:{default:!0}})}}),S(Ie,$e)};let Re=_(()=>c(Y)??[]);_c(be,{get items(){return c(Re)},itemKey:"id",renderItem:je,$$slots:{renderItem:!0}})}},$$slots:{default:!0}})};let u=N(e,"kind",3,"image"),d=N(e,"fieldConfig",3,void 0),f=N(e,"multiple",3,!1),h=N(e,"searchTerms",3,""),p=N(e,"gridId",3,void 0),g=N(e,"selectedResources",31,()=>At([]));const m=_(()=>at(e.serviceProps.serviceType,"stock_assets")),v=_(()=>at(e.serviceProps.serviceId,"")),b=_(()=>at(e.serviceProps.serviceLabel,"")),y=_(()=>at(e.serviceProps.hotlinking,!1)),w=_(()=>at(e.serviceProps.authType,"api_key")),x=_(()=>at(e.serviceProps.developerURL,"")),E=_(()=>at(e.serviceProps.apiKeyURL,"")),$=_(()=>e.serviceProps.apiKeyPattern),A=_(()=>e.serviceProps.init),k=_(()=>e.serviceProps.signIn),T=_(()=>e.serviceProps.list),C=_(()=>e.serviceProps.search),P=_(()=>e.serviceProps.upload),O=_(()=>n()?.type),I=At({userName:"",password:""});let L=ie(!0),D=ie(!1),B=ie(""),K=ie(""),G=ie(""),W=ie("initial"),Y=ie(null),R=ie(void 0),q=ie(At({show:!1,status:"info",length:0}));const J=_(()=>({kind:u(),fieldConfig:d(),apiKey:c(B),userName:c(K),password:c(G)}));let Q=0;const ee=async(fe="")=>{V(Y,null),fe=fe.trim();try{V(Y,await(fe?c(C)?.(fe,c(J)):c(T)?.(c(J)))??[],!0)}catch(be){V(R,"search_fetch_failed"),console.error(be)}},re=async fe=>{if(c(P)){V(q,{show:!0,status:"info",length:fe.length},!0);try{await c(P)(fe,c(J)),ee()}catch{V(q,{show:!0,status:"error",length:fe.length},!0)}}},te=async fe=>{const{downloadURL:be,fileName:Oe,credit:je}=fe;if(c(y))return{url:be,credit:je};try{const Re=await fetch(be),{ok:Ie,status:Pe}=Re;if(!Ie)throw new Error(`The response returned with HTTP status ${Pe}.`);const $e=await Re.blob(),Ee=new File([$e],Oe,{type:$e.type});return{url:be,credit:je,file:Ee}}catch(Re){V(R,"image_fetch_failed"),console.error(Re)}},de=fe=>g().some(be=>be.url===fe.downloadURL),he=async(fe,be)=>{const Oe=g().filter(je=>je.url!==fe.downloadURL);if(be){const je=await te(fe);je&&g([...Oe,je])}else g(Oe)};Vt(()=>{(async()=>(typeof c(A)=="function"&&(V(L,!1),V(L,await c(A)(),!0)),c(L)&&(V(B,r().apiKeys?.[c(v)]??"",!0),(fe=>{var be=ho(fe,2);V(K,be[0],!0),V(G,be[1],!0)})((r().logins?.[c(v)]??"").split(" ")),V(D,!!c(B)||!!c(G),!0),V(Y,null))))()}),ze(()=>{h(),c(D),xe(()=>{window.clearTimeout(Q),Q=window.setTimeout(()=>{c(D)&&ee(h())},1e3)})});var ue={uploadFiles:re},ge=YQ(),ye=M(ge);{var me=fe=>{var be=X(),Oe=M(be);{var je=Ie=>{cr(Ie,{children:(Pe,$e)=>{var Ee=UQ(),qe=F(Ee);Z(Ke=>ne(qe,Ke),[()=>o()(`assets_dialog.error.${c(R)}`)]),S(Pe,Ee)},$$slots:{default:!0}})},Re=Ie=>{var Pe=X(),$e=M(Pe);{var Ee=Ke=>{cr(Ke,{children:(lt,Te)=>{var Me=BQ(),pe=F(Me);Z(Le=>ne(pe,Le),[()=>o()("searching")]),S(lt,Me)},$$slots:{default:!0}})},qe=Ke=>{var lt=X(),Te=M(lt);{var Me=Le=>{cr(Le,{children:(Ne,nt)=>{var We=qQ(),Ze=F(We);Z(st=>ne(Ze,st),[()=>o()("no_files_found")]),S(Ne,We)},$$slots:{default:!0}})},pe=Le=>{var Ne=X(),nt=M(Ne);{var We=st=>{{let _t=_(()=>d()?.accept);Pd(st,{get accept(){return c(_t)},get multiple(){return f()},onDrop:({files:Ft})=>re(Ft),children:(Ft,ln)=>{l(Ft)},$$slots:{default:!0}})}},Ze=st=>{l(st)};U(nt,st=>{c(P)?st(We):st(Ze,!1)},!0)}S(Le,Ne)};U(Te,Le=>{c(Y).length?Le(pe,!1):Le(Me)},!0)}S(Ke,lt)};U($e,Ke=>{c(Y)?Ke(qe,!1):Ke(Ee)},!0)}S(Ie,Pe)};U(Oe,Ie=>{c(R)?Ie(je):Ie(Re,!1)})}S(fe,be)},Ae=fe=>{var be=X(),Oe=M(be);{var je=Ie=>{cr(Ie,{children:(Pe,$e)=>{var Ee=VQ(),qe=M(Ee),Ke=F(qe);{var lt=We=>{var Ze=X(),st=M(Ze);_r(st,()=>Qr.sanitize(o()("prefs.media.stock_photos.description",{values:{service:c(b),homeHref:`href="${c(x)}"`,apiKeyHref:`href="${c(E)}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})),S(We,Ze)};U(Ke,We=>{c(m)==="stock_assets"&&We(lt)})}var Te=z(Ke,2);{var Me=We=>{var Ze=X(),st=M(Ze);_r(st,()=>Qr.sanitize(o()(`cloud_storage.${c(v)}.auth.${c(W)}`,{default:o()(`cloud_storage.auth.${c(w)}.${c(W)}`,{values:{service:c(b)}})}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})),S(We,Ze)};U(Te,We=>{c(m)==="cloud_storage"&&We(Me)})}var pe=z(qe,2);{var Le=We=>{var Ze=HQ(),st=F(Ze);{let _t=_(()=>o()("prefs.media.stock_photos.field_label",{values:{service:c(b)}}));Yn(st,{flex:!0,monospace:!0,spellcheck:"false",get"aria-label"(){return c(_t)},oninput:Ft=>{const ln=Ft.target.value.trim();c($)?.test(ln)&&(V(B,ln,!0),V(D,!0),bt(ht,xe(r).apiKeys??={},xe(r)),bt(ht,xe(r).apiKeys[c(v)]=c(B),xe(r)),ee())}})}S(We,Ze)};U(pe,We=>{c(w)==="api_key"&&We(Le)})}var Ne=z(pe,2);{var nt=We=>{var Ze=KQ(),st=M(Ze),_t=F(st);{let Yt=_(()=>o()("user_name")),wt=_(()=>c(W)==="requested");Yn(_t,{flex:!0,spellcheck:"false",get"aria-label"(){return c(Yt)},get disabled(){return c(wt)},get value(){return I.userName},set value(Lt){I.userName=Lt}})}var Ft=z(st,2),ln=F(Ft);{let Yt=_(()=>o()("password")),wt=_(()=>c(W)==="requested");Zg(ln,{get"aria-label"(){return c(Yt)},get disabled(){return c(wt)},get value(){return I.password},set value(Lt){I.password=Lt}})}var qt=z(Ft,2),Et=F(qt);{let Yt=_(()=>o()("sign_in")),wt=_(()=>!I.userName||!I.password||c(W)==="requested");et(Et,{variant:"secondary",get label(){return c(Yt)},get disabled(){return c(wt)},onclick:async()=>{V(W,"requested"),I.userName=I.userName.trim(),I.password=I.password.trim(),await c(k)?.(I.userName,I.password)?(V(W,"success"),V(K,I.userName,!0),V(G,I.password,!0),V(D,!0),bt(ht,xe(r).logins??={},xe(r)),bt(ht,xe(r).logins[c(v)]=[c(K),c(G)].join(" "),xe(r)),ee()):V(W,"error")}})}S(We,Ze)};U(Ne,We=>{c(w)==="password"&&We(nt)})}S(Pe,Ee)},$$slots:{default:!0}})},Re=Ie=>{cr(Ie,{children:(Pe,$e)=>{var Ee=GQ(),qe=F(Ee);Z(Ke=>ne(qe,Ke),[()=>o()("cloud_storage.invalid")]),S(Pe,Ee)},$$slots:{default:!0}})};U(Oe,Ie=>{c(L)?Ie(je):Ie(Re,!1)},!0)}S(fe,be)};U(ye,fe=>{c(D)?fe(me):fe(Ae,!1)})}var Ce=z(ye,2);nr(Ce,{get show(){return c(q).show},set show(fe){c(q).show=fe},children:(fe,be)=>{Hn(fe,{get status(){return c(q).status},children:(Oe,je)=>{var Re=WQ(),Ie=M(Re);{var Pe=qe=>{var Ke=Fe();Z(lt=>ne(Ke,lt),[()=>o()(c(q).length===1?"uploading_file_progress":"uploading_files_progress",{values:{count:c(q).length}})]),S(qe,Ke)};U(Ie,qe=>{c(q).status==="info"&&qe(Pe)})}var $e=z(Ie,2);{var Ee=qe=>{var Ke=Fe();Z(lt=>ne(Ke,lt),[()=>o()(c(q).length===1?"uploading_file_failed":"uploading_files_failed",{values:{count:c(q).length}})]),S(qe,Ke)};U($e,qe=>{c(q).status==="error"&&qe(Ee)})}S(Oe,Re)},$$slots:{default:!0}})},$$slots:{default:!0}}),S(t,ge);var _e=se(ue);return s(),_e}const rp=t=>(t=t.trim(),t?t.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLocaleLowerCase():""),Gc=({value:t,terms:e})=>rp(t).includes(e),w$=(t,e=He)=>{var n=X(),r=M(n);_r(r,()=>Qr.sanitize(e().replace(/([-_.])/g,"$1<wbr>"),{ALLOWED_TAGS:["wbr"]})),S(t,n)};var ZQ=j('<div role="none" class="unsaved svelte-1ong0f1"> </div>'),QQ=j('<strong class="svelte-1ong0f1"><!></strong>'),eee=j("<!>/",1),tee=j('<div role="none" class="unsaved svelte-1ong0f1"> </div>'),nee=j('<span role="none" class="name svelte-1ong0f1"><!> <!></span>'),ree=j("<!> <!> <!>",1),iee=j('<div role="none" class="grid-wrapper svelte-1ong0f1"><!></div>'),oee=j('<span role="none"> </span>');const aee={hash:"svelte-1ong0f1",code:".grid-wrapper.svelte-1ong0f1 {overflow-y:auto;height:100%;}.grid-wrapper.svelte-1ong0f1 [role=listbox] {background-color:transparent;}.grid-wrapper.svelte-1ong0f1 [role=listbox].grid .unsaved {position:absolute;inset-block-start:8px;inset-inline-end:8px;z-index:1;}.grid-wrapper.svelte-1ong0f1 [role=listbox].list .name {display:flex;gap:8px;align-items:center;justify-content:space-between;}.unsaved.svelte-1ong0f1 {display:flex;justify-content:center;align-items:center;border-color:var(--sui-info-border-color);border-radius:4px;padding:2px 6px;color:var(--sui-info-foreground-color);background-color:var(--sui-info-background-color);font-size:var(--sui-font-size-small);}.name.svelte-1ong0f1 {color:var(--sui-tertiary-foreground-color);}.name.svelte-1ong0f1 strong:where(.svelte-1ong0f1) {color:var(--sui-primary-foreground-color);font-weight:var(--sui-font-weight-normal);}"};function SR(t,e){ae(e,!0),ke(t,aee);const n=()=>H(ce,"$_",i),r=()=>H(mn,"$isSmallScreen",i),[i,o]=ve();let a=N(e,"multiple",3,!1),s=N(e,"assets",19,()=>[]),l=N(e,"viewType",3,"grid"),u=N(e,"searchTerms",3,""),d=N(e,"basePath",3,void 0),f=N(e,"gridId",3,void 0),h=N(e,"checkerboard",3,!1),p=N(e,"selectedResources",31,()=>At([])),g=N(e,"onSelect",3,void 0);const m=_(()=>(u()?s().filter(({name:$})=>rp($).includes(u())):s()).filter(($,A,k)=>k.findIndex(T=>T.path===$.path)===A)),v=$=>p().some(A=>fn(A.asset,$)),b=($,A)=>{const k=p().filter(T=>!fn(T.asset,$));A?(p([...k,{asset:$}]),g()?.({asset:$})):p(k)};var y=X(),w=M(y);{var x=$=>{var A=iee(),k=F(A);kR(k,{get multiple(){return a()},get gridId(){return f()},get viewType(){return l()},showTitle:!0,children:(T,C)=>{_c(T,{get items(){return c(m)},itemKey:"path",renderItem:(O,I=He)=>{var L=X(),D=M(L);En(D,Rt,null,B=>{const K=_(()=>{const{kind:Y,name:R,path:q,unsaved:J,folder:Q}=I();return{kind:Y,name:R,path:q,unsaved:J,folder:Q}}),G=_(()=>d()&&!c(K).folder.entryRelative?on(c(K).path.replace(d(),"")):c(K).name),W=_(()=>c(G).split("/"));{let Y=_(()=>v(I()));xR(B,{get value(){return c(K).path},get viewType(){return l()},get multiple(){return a()},get selected(){return c(Y)},onChange:({detail:{selected:R}})=>{b(I(),R)},children:(R,q)=>{var J=ree(),Q=M(J);{var ee=he=>{var ue=ZQ(),ge=F(ue);Z(ye=>ne(ge,ye),[()=>n()("assets_dialog.unsaved")]),S(he,ue)};U(Q,he=>{l()==="grid"&&c(K).unsaved&&he(ee)})}var re=z(Q,2);xa(re,{get kind(){return c(K).kind},get asset(){return I()},variant:"tile",get checkerboard(){return h()}});var te=z(re,2);{var de=he=>{var ue=nee(),ge=F(ue);Ur(ge,{lines:2,children:(Ae,Ce)=>{var _e=X(),fe=M(_e);rt(fe,17,()=>c(W),yr,(be,Oe,je)=>{var Re=X(),Ie=M(Re);{var Pe=Ee=>{var qe=QQ(),Ke=F(qe);w$(Ke,()=>c(Oe)),S(Ee,qe)},$e=Ee=>{var qe=eee(),Ke=M(qe);w$(Ke,()=>c(Oe)),S(Ee,qe)};U(Ie,Ee=>{je===c(W).length-1?Ee(Pe):Ee($e,!1)})}S(be,Re)}),S(Ae,_e)},$$slots:{default:!0}});var ye=z(ge,2);{var me=Ae=>{var Ce=tee(),_e=F(Ce);Z(fe=>ne(_e,fe),[()=>n()("assets_dialog.unsaved")]),S(Ae,Ce)};U(ye,Ae=>{l()==="list"&&c(K).unsaved&&Ae(me)})}S(he,ue)};U(te,he=>{(!r()||l()==="list")&&he(de)})}S(R,J)},$$slots:{default:!0}})}}),S(O,L)},$$slots:{renderItem:!0}})},$$slots:{default:!0}}),S($,A)},E=$=>{cr($,{children:(A,k)=>{var T=oee(),C=F(T);Z(P=>ne(C,P),[()=>n()("no_files_found")]),S(A,T)},$$slots:{default:!0}})};U(w,$=>{c(m).length?$(x):$(E,!1)})}S(t,y),se(),o()}function see(t,e){ae(e,!0);const n=()=>H(Iu,"$selectAssetsView",r),[r,i]=ve();let o=N(e,"multiple",3,!1),a=N(e,"accept",3,void 0),s=N(e,"assets",19,()=>[]),l=N(e,"searchTerms",3,""),u=N(e,"basePath",3,void 0),d=N(e,"selectedResources",31,()=>At([])),f=ie(void 0);ze(()=>{d().length||xe(()=>{c(f)?.reset()})}),St(Pd(t,{get multiple(){return o()},get accept(){return a()},get onDrop(){return e.onDrop},children:(h,p)=>{{let g=_(()=>n()?.type);SR(h,{get multiple(){return o()},get assets(){return s()},get viewType(){return c(g)},get searchTerms(){return l()},get basePath(){return u()},gridId:"select-assets-grid",checkerboard:!0,get selectedResources(){return d()},set selectedResources(m){d(m)}})}},$$slots:{default:!0}}),h=>V(f,h,!0),()=>c(f)),se(),i()}const x$=async({draft:t,file:e})=>{const n=await zl(e);let r;return await Promise.all(Object.entries(t.files??{}).map(async([i,o])=>{!r&&await zl(o.file)===n&&(r=i)})),r},ER=async({file:t,blobURL:e,folder:n,targetFolderPath:r})=>{const{name:i,size:o}=t;return{unsaved:!0,file:t,blobURL:e??URL.createObjectURL(t),name:i,path:r?`${r}/${i}`:i,sha:await Bl(t),size:o,kind:sd(i),folder:n}},TR=async({draft:t,targetFolderPath:e})=>Promise.all(Object.entries(t.files).map(async([n,{file:r,folder:i}])=>ER({file:r,blobURL:n,folder:i,targetFolderPath:e}))),lee=async({draft:t,resource:e,libraryConfig:n})=>{const{transformations:r,max_file_size:i}=n??{},{url:o,credit:a}=e;let{asset:s,file:l}=e,u="",d;if(l){const f=await x$({draft:t,file:l});if(f)u=f;else{r&&(l=await rL(l,r));const h=await Bl(l),{folder:p}=e,g=[...oe(Wn),...await TR({draft:t})].find(m=>m.sha===h&&fn(m.folder,p));g?(s=g,l=void 0):l.size>i?(d=l.name,l=void 0):(u=URL.createObjectURL(l),t.files[u]={file:l,folder:p})}}return s&&(s.unsaved?s.file&&(u=await x$({draft:t,file:s.file})):u=Wf(s,{pathOnly:!0,allowSpecial:!0,entry:t.originalEntry})),o&&!l&&!s&&(u=o),{value:u,credit:a?Qr.sanitize(a,{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href"]}):"",oversizedFileName:d}},uw=(t=oe(Pt))=>t?.media_libraries?.uploadcare??(t?.media_library?.name==="uploadcare"?t?.media_library:void 0),$1=()=>uw()?.config?.publicKey,cee=()=>!!$1(),$R=(t,{fieldConfig:e}={})=>{const{settings:{autoFilename:n=!1,defaultOperations:r=void 0}={},config:{cdnBase:i=void 0}={}}=uw(e)??uw()??{};return t.map(o=>{const{uuid:a,original_filename:s,original_file_url:l,mime_type:u,datetime_uploaded:d,size:f}=o,h=`${new URL(i??l).origin}/${a}/`;return{id:a,description:s,previewURL:`${h}-/preview/400x400/`,downloadURL:`${h}${r?`-${r}`:""}${n?s:""}`,fileName:s,lastModified:new Date(d),size:f,kind:u.startsWith("image/")?"image":u.startsWith("video/")?"video":"other"}})},AR=async(t,{maxPages:e=10,filter:n}={})=>{const r=$1();if(!r)return Promise.reject(new Error("Uploadcare public key is not configured"));const{kind:i,fieldConfig:o,apiKey:a}=t,s={Accept:"application/vnd.uploadcare-v0.7+json",Authorization:`Uploadcare.Simple ${r}:${a}`},l=new URLSearchParams({limit:"100",ordering:"-datetime_uploaded",stored:"true"}),u=[];let d=`https://api.uploadcare.com/files/?${l}`;for(let f=0;f<e&&d;f+=1){const h=await fetch(d,{headers:s});if(!h.ok)return Promise.reject(new Error(`Failed to fetch files: ${h.statusText}`));const p=await h.json();let{results:g}=p;if(i==="image"&&(g=g.filter(m=>m.is_image)),n&&(g=g.filter(n)),u.push(...g),d=p.next,!d)break;await Rt(50)}return $R(u,{fieldConfig:o})},uee=async t=>AR(t),dee=async(t,e)=>{const n=t.toLowerCase();return AR(e,{filter:i=>i.original_filename.toLowerCase().includes(n)})},fee=async(t,e)=>{const n=new TextEncoder,r=n.encode(String(e)),i=n.encode(t),o=await crypto.subtle.importKey("raw",i,{name:"HMAC",hash:"SHA-256"},!1,["sign"]),a=await crypto.subtle.sign("HMAC",o,r);return Array.from(new Uint8Array(a)).map(l=>l.toString(16).padStart(2,"0")).join("")},hee=async(t,e)=>{if(t.length===0)return[];const n=$1();if(!n)return Promise.reject(new Error("Uploadcare public key is not configured"));const{fieldConfig:r,apiKey:i}=e;if(!i)return Promise.reject(new Error("Uploadcare secret key is not provided"));const o=Math.floor(Date.now()/1e3)+1800,a=await fee(i,o),s=new FormData;s.append("UPLOADCARE_PUB_KEY",n),s.append("UPLOADCARE_STORE","1"),s.append("signature",a),s.append("expire",String(o)),t.forEach(f=>{s.append(Px(f.name),f)});const l=await fetch("https://upload.uploadcare.com/base/",{method:"POST",body:s});if(!l.ok)throw new Error(`Failed to upload files: ${l.statusText}`);const u=await l.json(),d=Object.entries(u).filter(([f])=>!f.startsWith("UPLOADCARE_")).map(([f,h])=>{const p=t.find(v=>v.name===f),g=p?.type||"application/octet-stream",m=g.startsWith("image/");return{uuid:h,original_filename:f,original_file_url:`https://ucarecdn.com/${h}/${f}`,size:p?.size||0,mime_type:g,is_image:m,is_ready:!0,content_info:null,datetime_uploaded:new Date().toISOString(),datetime_stored:new Date().toISOString(),datetime_removed:null}});return $R(d,{fieldConfig:r})},pee={serviceType:"cloud_storage",serviceId:"uploadcare",serviceLabel:"Uploadcare",serviceURL:"https://uploadcare.com/",showServiceLink:!0,hotlinking:!0,authType:"api_key",developerURL:"https://uploadcare.com/docs/",apiKeyURL:"https://app.uploadcare.com/projects/-/api-keys/",apiKeyPattern:/^[a-f0-9]{20}$/,isEnabled:cee,list:uee,search:dee,upload:hee},A1={cloudinary:CQ,uploadcare:pee},k$=["en-US,pt-BR,es-ES,ca-ES,de-DE,it-IT,fr-FR,sv-SE,id-ID,pl-PL,ja-JP,zh-TW,zh-CN,ko-KR,th-TH,nl-NL","hu-HU,vi-VN,cs-CZ,da-DK,fi-FI,uk-UA,el-GR,ro-RO,nb-NO,sk-SK,tr-TR,ru-RU"].join(",").split(","),CR="https://api.pexels.com/v1",PR={per_page:80},gee=()=>{const t=oe(Bt).toLowerCase(),[e]=t.split("-");return k$.find(n=>n.toLowerCase()===t)??k$.find(n=>n.split("-")[0]===e)??"en-US"},OR=t=>t.map(({id:e,url:n,alt:r,src:{large2x:i,medium:o},photographer:a})=>({id:String(e),description:n.match(/\/photo\/(?<alt>.+?)-\d+\/$/)?.groups?.alt.replace(/-/g," ")??r,previewURL:o,downloadURL:i,fileName:`pexels-${a.split(/\s+/).join("-").toLowerCase()}-${e}.jpg`,kind:"image",credit:`<a href="${n}">Photo by ${a} on Pexels</a>`})),mee=async({apiKey:t})=>{const e={Authorization:t},n=new URLSearchParams(PR),r=await fetch(`${CR}/curated?${n}`,{headers:e});if(!r.ok)return Promise.reject();const i=(await r.json()).photos;return OR(i)},vee=async(t,{apiKey:e})=>{const n={Authorization:e},r=new URLSearchParams({...PR,query:t,locale:gee()}),i=[];for(let o=1;o<=2;o+=1){r.set("page",String(o));const a=await fetch(`${CR}/search?${r}`,{headers:n});if(!a.ok)return Promise.reject();const{photos:s,next_page:l}=await a.json();if(i.push(...s),!l)break;await Rt(50)}return OR(i)},_ee={serviceType:"stock_assets",serviceId:"pexels",serviceLabel:"Pexels",serviceURL:"https://www.pexels.com/",showServiceLink:!0,hotlinking:!1,authType:"api_key",developerURL:"https://www.pexels.com/api/",apiKeyURL:"https://www.pexels.com/api/new/",apiKeyPattern:/^[a-zA-Z\d]{56}$/,list:mee,search:vee},bee="cs,da,de,en,es,fr,id,it,hu,nl,no,pl,pt,ro,sk,fi,sv,tr,vi,th,bg,ru,el,ja,ko,zh".split(","),LR="https://pixabay.com/api",IR={image_type:"photo",min_width:1280,safesearch:!0,per_page:150},NR=t=>t.map(({id:e,webformatURL:n,previewURL:r,largeImageURL:i,imageWidth:o,imageHeight:a,pageURL:s,tags:l,user:u})=>({id:String(e),description:l,previewURL:n.replace("_640.",o>a?"_180.":"_340."),downloadURL:i,fileName:r.split("/").pop().replace("_150.","_1280."),kind:"image",credit:`<a href="${s}">Photo by ${u} on Pixabay`})),RR=()=>{const[t]=oe(Bt).toLowerCase().split("-");return bee.includes(t)?t:"en"},yee=async({apiKey:t})=>{const e=new URLSearchParams({...IR,key:t,lang:RR(),editors_choice:String(!0)}),n=await fetch(`${LR}/?${e}`);if(!n.ok)return Promise.reject();const r=(await n.json()).hits;return NR(r)},wee=async(t,{apiKey:e})=>{const n=new URLSearchParams({...IR,key:e,lang:RR(),q:t}),r=await fetch(`${LR}/?${n}`);if(!r.ok)return Promise.reject();const i=(await r.json()).hits;return NR(i)},xee={serviceType:"stock_assets",serviceId:"pixabay",serviceLabel:"Pixabay",serviceURL:"https://pixabay.com/",showServiceLink:!0,hotlinking:!1,authType:"api_key",developerURL:"https://pixabay.com/service/about/api/",apiKeyURL:"https://pixabay.com/api/docs/#api_key",apiKeyPattern:/^\d+-[a-f\d]{25}$/,list:yee,search:wee},S$=["af,sq,am,ar,hy,as,az,bn,ba,eu,bs,bg,yue,ca,lzh,zh-Hans,zh-Hant,hr,cs,da,prs,dv,nl,en,et,fo,fj","fil,fi,fr,fr-ca,gl,ka,de,el,gu,ht,he,hi,mww,hu,is,id,ikt,iu,iu-Latn,ga,it,ja,kn,kk,km,ko,ku,kmr","ky,lo,lv,lt,mk,mg,ms,ml,mt,mi,mr,mn-Cyrl,mn-Mong,my,ne,nb,or,ps,fa,pl,pt,pt-pt,pa,otq,ro,ru,sm","sr-Cyrl,sr-Latn,sk,sl,so,es,sw,sv,ty,ta,tt,te,th,bo,ti,to,tr,tk,uk,hsb,ur,ug,uz,vi,cy,yua,zu"].join(",").split(","),MR="https://api.unsplash.com",E$="utm_source=sveltia-cms&utm_medium=referral",DR={per_page:30},kee=()=>{const t=oe(Bt).toLowerCase(),[e]=t.split("-");return S$.find(n=>n.toLowerCase()===t)??S$.find(n=>n.split("-")[0]===e)??"en"},FR=t=>t.map(({id:e,description:n,alt_description:r,urls:{regular:i,thumb:o},user:{username:a,name:s}})=>({id:String(e),description:[n,r].filter(Boolean).join(" — "),previewURL:o,downloadURL:i,fileName:`${s.split(/\s+/).join("-").toLowerCase()}-${e}-unsplash.jpg`,kind:"image",credit:`Photo by <a href="https://unsplash.com/@${a}?${E$}">${s}</a> on <a href="https://unsplash.com/?${E$}">Unsplash</a>`})),See=async({apiKey:t})=>{const e={Authorization:`Client-ID ${t}`},n=new URLSearchParams(DR),r=await fetch(`${MR}/photos?${n}`,{headers:e});if(!r.ok)return Promise.reject();const i=await r.json();return FR(i)},Eee=async(t,{apiKey:e})=>{const n={Authorization:`Client-ID ${e}`},r=new URLSearchParams({...DR,query:t,lang:kee()}),i=[];for(let o=1;o<=5;o+=1){r.set("page",String(o));const a=await fetch(`${MR}/search/photos?${r}`,{headers:n});if(!a.ok)return Promise.reject();const{results:s,total_pages:l}=await a.json();if(i.push(...s),l===o)break;await Rt(50)}return FR(i)},Tee={serviceType:"stock_assets",serviceId:"unsplash",serviceLabel:"Unsplash",serviceURL:"https://unsplash.com/",showServiceLink:!0,hotlinking:!0,authType:"api_key",developerURL:"https://unsplash.com/developers",apiKeyURL:"https://unsplash.com/oauth/applications",apiKeyPattern:/^[a-zA-Z\d-]{40,}$/,list:See,search:Eee},nm={pexels:_ee,pixabay:xee,unsplash:Tee},zR=({fieldConfig:t}={})=>{const e=QO({libraryName:"stock_assets",fieldConfig:t}),n=Object.keys(nm),{providers:r}=e;return{providers:Array.isArray(r)?r:n}};var $ee=j("<!> <!>",1),Aee=j("<!> <!>",1),Cee=j("<a> </a>"),Pee=j("<!> <!>",1),Oee=j("<!> <!> <!>",1),Lee=j('<div role="none" class="filter-tools svelte-5b1zbe"><!></div>'),Iee=j('<div role="none"> </div> <!>',1),Nee=j('<div role="none" class="wrapper svelte-5b1zbe"><div role="none" class="nav svelte-5b1zbe"><!> <!></div> <div role="none" class="content-pane svelte-5b1zbe"><!> <!> <!></div></div>'),Ree=j("<!> <!>",1);const Mee={hash:"svelte-5b1zbe",code:`.wrapper.svelte-5b1zbe {display:flex;gap:16px;height:60dvh;}
|
|
647
647
|
@media (width < 768px) {.wrapper.svelte-5b1zbe {flex-direction:column;overflow:hidden;height:72dvh;}
|
|
648
648
|
}.wrapper.svelte-5b1zbe .nav:where(.svelte-5b1zbe) {display:flex;gap:4px;}
|
|
649
649
|
@media (width < 768px) {.wrapper.svelte-5b1zbe .nav:where(.svelte-5b1zbe) {flex-direction:column;}
|
|
@@ -651,9 +651,8 @@ Respond with JSON only:`,xZ="anthropic",kZ="Anthropic Claude",SZ="Anthropic API"
|
|
|
651
651
|
`),!0),V(y,!0)):V(w,""),Oe.length&&V(b,!0),V(E,!1)},re=({files:_e})=>{_e.length&&ee(_e.map(fe=>({file:fe,folder:c(K)})))},te=_e=>{if(!n())return;const fe=Kn(n().currentValues[e.locale]),be=[];for(let Oe=0;;Oe+=1){const je=`${e.keyPath}.${Oe}`,Re=`${e.keyPath}.${Oe+1}`;if(Oe<_e)be.push(fe[je]);else if(Re in fe)be.push(fe[Re]),bt(Xe,xe(n).currentValues[e.locale][je]=fe[Re],xe(n));else{bt(Xe,xe(n).currentValues[e.locale][je]=null,xe(n)),delete n().currentValues[e.locale][je];break}}d(Object.values(be))},de=_e=>{n()&&(fe=>{var be=ho(fe,2);bt(Xe,xe(n).currentValues[e.locale][`${e.keyPath}.${_e}`]=be[0],xe(n)),bt(Xe,xe(n).currentValues[e.locale][`${e.keyPath}.${_e+1}`]=be[1],xe(n))})([n().currentValues[e.locale][`${e.keyPath}.${_e+1}`],n().currentValues[e.locale][`${e.keyPath}.${_e}`]])};var he=Xee(),ue=M(he);{var ge=_e=>{{let fe=_(()=>c(k)??(c(L)?sa.join(","):void 0));St(Pd(_e,{get multiple(){return c(G)},get disabled(){return h()},get accept(){return c(fe)},onDrop:re,children:(be,Oe)=>{s(be)},$$slots:{default:!0}}),be=>V(x,be,!0),()=>c(x))}},ye=_e=>{s(_e)};U(ue,_e=>{c(J)?_e(ge):_e(ye,!1)})}var me=z(ue,2);{let _e=_(()=>c(L)?"image":void 0),fe=_(()=>c(m)?!1:c(G));Dee(me,{get kind(){return c(_e)},get multiple(){return c(fe)},get accept(){return c(k)},get canEnterURL(){return c(T)},get entryDraft(){return Xe},get fieldConfig(){return e.fieldConfig},get assetLibraryFolderMap(){return c(B)},onSelect:ee,get open(){return c(g)},set open(be){V(g,be,!0)}})}var Ae=z(me,2);{let _e=_(()=>r()("assets_dialog.large_file.title"));Zm(Ae,{get title(){return c(_e)},get open(){return c(b)},set open(fe){V(b,fe,!0)},children:(fe,be)=>{var Oe=Fe();Z(je=>ne(Oe,je),[()=>r()("warning_oversized_file",{values:{size:Fm(c(W))}})]),S(fe,Oe)},$$slots:{default:!0}})}var Ce=z(Ae,2);{let _e=_(()=>r()("assets_dialog.photo_credit.title")),fe=_(()=>r()("copy"));md(Ce,{get title(){return c(_e)},get okLabel(){return c(fe)},onOk:()=>{navigator.clipboard.writeText(c(w))},get open(){return c(y)},set open(be){V(y,be,!0)},children:(be,Oe)=>{var je=Jee(),Re=M(je),Ie=F(Re),Pe=z(Re,2),$e=F(Pe);Zh($e,{flex:!0,readonly:!0,get value(){return c(w)},onclick:Ee=>{Ee.target.focus(),Ee.target.select()}}),Z(Ee=>ne(Ie,Ee),[()=>r()("assets_dialog.photo_credit.description")]),S(be,je)},$$slots:{default:!0}})}S(t,he),se(),o()}var Qee=j('<p class="svelte-83cby6"><!></p>'),ete=j('<p class="svelte-83cby6"> </p>');const tte={hash:"svelte-83cby6",code:`@media (width < 768px) {[role='document'] section > p.svelte-83cby6:has(img) {margin-inline:calc(var(--entry-preview-padding-inline) * -1);}
|
|
652
652
|
}`};function A$(t,e){ae(e,!0),ke(t,tte);const n=()=>H(Xe,"$entryDraft",r),[r,i]=ve();let o=ie(void 0),a=ie(void 0);const s=_(()=>n()?.originalEntry),l=_(()=>n()?.collectionName??""),u=_(()=>n()?.fileName);ze(()=>{e.value,xe(async()=>{V(o,e.value?await LP(e.value):void 0,!0),V(a,c(o)?await ql({value:e.value,entry:c(s),collectionName:c(l),fileName:c(u)}):void 0,!0)})});var d=X(),f=M(d);{var h=g=>{var m=Qee(),v=F(m);{let b=_(()=>["audio","video"].includes(c(o)));xa(v,{get kind(){return c(o)},get src(){return c(a)},get controls(){return c(b)}})}S(g,m)},p=g=>{var m=X(),v=M(m);{var b=y=>{var w=ete(),x=F(w);Z(()=>ne(x,e.value)),S(y,w)};U(v,y=>{e.value.trim()&&!e.value.startsWith("blob:")&&y(b)},!0)}S(g,m)};U(f,g=>{c(o)&&c(a)?g(h):g(p,!1)})}S(t,d),se(),i()}function C$(t,e){ae(e,!0);var n=X(),r=M(n);{var i=a=>{var s=X(),l=M(s);{var u=d=>{var f=X(),h=M(f);rt(h,17,()=>e.currentValue,yr,(p,g)=>{A$(p,{get value(){return c(g)}})}),S(d,f)};U(l,d=>{Array.isArray(e.currentValue)&&d(u)})}S(a,s)},o=a=>{var s=X(),l=M(s);{var u=d=>{A$(d,{get value(){return e.currentValue}})};U(l,d=>{typeof e.currentValue=="string"&&e.currentValue&&d(u)},!0)}S(a,s)};U(r,a=>{qm(e.fieldConfig)?a(i):a(o,!1)})}S(t,n),se()}const C1=({entryDraft:t,valueStoreKey:e="currentValues",keyPath:n,locale:r})=>Object.entries(oe(t)[e][r]??{}).filter(([i])=>i.startsWith(`${n}.`)).map(([i,o])=>[i.replace(`${n}.`,""),o]),nte=({pairs:t,edited:e})=>t.map(([n],r,i)=>{if(!n.trim()&&e[r])return"empty";if(n.trim()&&i.findIndex(o=>o[0]===n)!==r)return"duplicate"}),rte=({entryDraft:t,keyPath:e,locale:n,fieldConfig:r,pairs:i})=>{const{i18n:o}=r;No.set(!1),t.update(a=>(a&&Object.entries(a.currentValues).forEach(([s,l])=>{(s===n||o==="duplicate")&&(Object.entries(l).forEach(([u])=>{u.startsWith(`${e}.`)&&delete l[u]}),i.forEach(([u,d])=>{l[`${e}.${u}`]=d}))}),a)),No.set(!0)};var ite=j('<th scope="col" class="action svelte-18v8t2h"></th>'),ote=j('<td class="action svelte-18v8t2h"><!></td>'),ate=j('<tr><td class="key svelte-18v8t2h"><!></td><td class="value svelte-18v8t2h"><!></td><!></tr>'),ste=j('<table class="svelte-18v8t2h"><thead><tr><th scope="col" class="key svelte-18v8t2h"> </th><th scope="col" class="value svelte-18v8t2h"> </th><!></tr></thead><tbody></tbody></table>'),lte=j("<!> <!>",1),cte=j('<!> <!> <div role="none"><!></div>',1);const ute={hash:"svelte-18v8t2h",code:`table.svelte-18v8t2h {width:-moz-available;width:-webkit-fill-available;width:stretch;}th.svelte-18v8t2h,
|
|
653
653
|
td.svelte-18v8t2h {border-width:0;}th.svelte-18v8t2h {padding-block:4px;color:var(--sui-tertiary-foreground-color);font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-normal);text-align:start;}th.key.svelte-18v8t2h, th.value.svelte-18v8t2h {width:50%;}td.svelte-18v8t2h {padding:0;vertical-align:middle;}`};function dte(t,e){ae(e,!0),ke(t,ute);const n=()=>H(ce,"$_",i),r=()=>H(Xe,"$entryDraft",i),[i,o]=ve(),{valueStoreKey:a="currentValues"}=pr("field-editor")??{};let s=N(e,"readonly",3,!1);const l=_(()=>at(e.fieldConfig.i18n,!1)),u=_(()=>e.fieldConfig.key_label),d=_(()=>e.fieldConfig.value_label),f=_(()=>at(e.fieldConfig.max,1/0)),h=_(()=>c(u)||n()("key_value.key")),p=_(()=>c(d)||n()("key_value.value"));let g=ie(At([]));const m=At([]);let v=ie(At([])),b=ie(At([]));const y=()=>{if(!r())return;const L=C1({entryDraft:Xe,valueStoreKey:a,keyPath:e.keyPath,locale:e.locale});fn(c(g),L)||(V(g,[...L],!0),V(v,L.map(()=>!1),!0)),!c(g).length&&r()[a][e.locale][e.keyPath]!==null&&bt(Xe,xe(r)[a][e.locale][e.keyPath]=null,xe(r))},w=()=>{r()&&(Object.entries(r()[a]).forEach(([I,L])=>{(I===e.locale||c(l)==="duplicate")&&delete L[e.keyPath]}),c(g).push(["",""]),c(v).push(!1),window.requestAnimationFrame(()=>{m[c(g).length-1].querySelector("input").focus()}))},x=I=>{c(g).splice(I,1),c(v).splice(I,1)},E=()=>{if(V(b,nte({pairs:c(g),edited:c(v)}),!0),!r()||c(b).some(Boolean)||c(g).some(([L])=>!L.trim()))return;rte({entryDraft:Xe,fieldConfig:e.fieldConfig,keyPath:e.keyPath,locale:e.locale,pairs:c(g)})};ze(()=>{Kn(r()?.[a][e.locale]),xe(()=>{y()})}),ze(()=>{Kn(c(g)),xe(()=>{E()})});var $=cte(),A=M($);{var k=I=>{var L=ste(),D=F(L),B=F(D),K=F(B),G=F(K),W=z(K),Y=F(W),R=z(W);{var q=Q=>{var ee=ite();Z(re=>Se(ee,"aria-label",re),[()=>n()("key_value.action")]),S(Q,ee)};U(R,Q=>{s()||Q(q)})}var J=z(D);rt(J,21,()=>c(g),yr,(Q,ee,re)=>{var te=ate(),de=F(te),he=F(de);{let Ae=_(()=>!!c(b)[re]),Ce=_(()=>c(b)[re]?`${e.fieldId}-kv-error`:void 0);Yn(he,{get readonly(){return s()},flex:!0,get invalid(){return c(Ae)},get"aria-label"(){return c(h)},get"aria-errormessage"(){return c(Ce)},oninput:()=>{c(v)[re]=!0},onkeydown:_e=>{_e.key==="Enter"&&!_e.isComposing&&m[re].querySelector("td.value input").focus()},get value(){return c(ee)[0]},set value(_e){c(ee)[0]=_e}})}var ue=z(de),ge=F(ue);Yn(ge,{get readonly(){return s()},flex:!0,get"aria-label"(){return c(p)},onkeydown:Ae=>{Ae.key==="Enter"&&!Ae.isComposing&&(re<c(g).length-1?m[re+1].querySelector("input").focus():c(g).length<c(f)&&w())},get value(){return c(ee)[1]},set value(Ae){c(ee)[1]=Ae}});var ye=z(ue);{var me=Ae=>{var Ce=ote(),_e=F(Ce);{const fe=Oe=>{Qe(Oe,{name:"close"})};let be=_(()=>n()("remove"));et(_e,{variant:"ghost",size:"small",iconic:!0,get"aria-label"(){return c(be)},onclick:()=>{x(re)},startIcon:fe,$$slots:{startIcon:!0}})}S(Ae,Ce)};U(ye,Ae=>{s()||Ae(me)})}St(te,(Ae,Ce)=>m[Ce]=Ae,Ae=>m?.[Ae],()=>[re]),S(Q,te)}),Z(()=>{ne(G,c(h)),ne(Y,c(p))}),S(I,L)};U(A,I=>{c(g).length&&I(k)})}var T=z(A,2);{var C=I=>{T1(I,{get id(){return`${e.fieldId??""}-kv-error`},children:(L,D)=>{var B=lte(),K=M(B);{var G=R=>{var q=Fe();Z(J=>ne(q,J),[()=>n()("key_value.empty_key")]),S(R,q)};U(K,R=>{c(b).includes("empty")&&R(G)})}var W=z(K,2);{var Y=R=>{var q=Fe();Z(J=>ne(q,J),[()=>n()("key_value.duplicate_key")]),S(R,q)};U(W,R=>{c(b).includes("duplicate")&&R(Y)})}S(L,B)}})};U(T,I=>{c(b).some(Boolean)&&I(C)})}var P=z(T,2),O=F(P);{let I=_(()=>n()("add")),L=_(()=>s()||c(g).length>=c(f));et(O,{get label(){return c(I)},variant:"tertiary",get disabled(){return c(L)},onclick:()=>{w()}})}S(t,$),se(),o()}var fte=j('<tr><td class="svelte-dq8vuc"> </td><td class="svelte-dq8vuc"> </td></tr>'),hte=j('<table class="svelte-dq8vuc"><thead><tr><th scope="col" class="svelte-dq8vuc"> </th><th scope="col" class="svelte-dq8vuc"> </th></tr></thead><tbody></tbody></table>');const pte={hash:"svelte-dq8vuc",code:'@charset "UTF-8";table.svelte-dq8vuc {width:-moz-available;width:-webkit-fill-available;width:stretch;}th.svelte-dq8vuc {padding-block:4px;width:50%;color:var(--sui-tertiary-foreground-color);background-color:var(--sui-tertiary-background-color);font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-normal);text-align:start;}td.svelte-dq8vuc:empty::after {content:" ";}'};function gte(t,e){ae(e,!0),ke(t,pte);const n=()=>H(ce,"$_",i),r=()=>H(Xe,"$entryDraft",i),[i,o]=ve(),a=_(()=>e.fieldConfig.key_label),s=_(()=>e.fieldConfig.value_label),l=_(()=>c(a)||n()("key_value.key")),u=_(()=>c(s)||n()("key_value.value"));let d=ie(At([]));const f=()=>{const v=C1({entryDraft:Xe,keyPath:e.keyPath,locale:e.locale});fn(c(d),v)||V(d,v,!0)};ze(()=>{r()&&(Kn(r().currentValues[e.locale]),xe(()=>{f()}))});var h=X(),p=M(h);{var g=m=>{var v=hte(),b=F(v),y=F(b),w=F(y),x=F(w),E=z(w),$=F(E),A=z(b);rt(A,21,()=>c(d),yr,(k,T)=>{var C=_(()=>ho(c(T),2));let P=()=>c(C)[0],O=()=>c(C)[1];var I=fte(),L=F(I),D=F(L),B=z(L),K=F(B);Z(()=>{ne(D,P()),ne(K,O())}),S(k,I)}),Z(()=>{ne(x,c(l)),ne($,c(u))}),S(m,v)};U(p,m=>{c(d).length&&m(g)})}S(t,h),se(),o()}function jR(t,e){const n=()=>H(Gl,"$isRTL",r),[r,i]=ve();let o=N(e,"expanded",3,!1);{let a=_(()=>o()?"expand_more":n()?"chevron_left":"chevron_right");Qe(t,{get name(){return c(a)}})}i()}function dw(t,e){ae(e,!0);const n=()=>H(ce,"$_",r),[r,i]=ve();let o=N(e,"disabled",3,!1),a=N(e,"items",19,()=>[]),s=N(e,"addItem",3,()=>{});const l=_(()=>e.fieldConfig.name),u=_(()=>e.fieldConfig.label),d=_(()=>e.fieldConfig.types),f=_(()=>e.fieldConfig.widget==="list"?e.fieldConfig:void 0),h=_(()=>c(f)?.label_singular??""),p=_(()=>c(f)?.max??void 0),g=_(()=>n()("add_x",{values:{name:c(h)||c(u)||c(l)}})),m=_(()=>o()||typeof c(p)=="number"&&a().length===c(p));var v=X(),b=M(v);{var y=x=>{ei(x,{variant:"tertiary",get label(){return c(g)},get disabled(){return c(m)},startIcon:k=>{Qe(k,{name:"add"})},endIcon:k=>{},popup:k=>{{let T=_(()=>n()("select_list_type"));xr(k,{get"aria-label"(){return c(T)},children:(C,P)=>{var O=X(),I=M(O);rt(I,17,()=>c(d),({name:L,label:D})=>L,(L,D)=>{let B=()=>c(D).name,K=()=>c(D).label;{let G=_(()=>K()||B());vt(L,{get label(){return c(G)},onclick:()=>s()({type:B()})})}}),S(C,O)},$$slots:{default:!0}})}},$$slots:{startIcon:!0,endIcon:!0,popup:!0}})},w=x=>{et(x,{variant:"tertiary",get label(){return c(g)},get disabled(){return c(m)},onclick:()=>s()(),startIcon:$=>{Qe($,{name:"add"})},$$slots:{startIcon:!0}})};U(b,x=>{Array.isArray(c(d))?x(y):x(w,!1)})}S(t,v),se(),i()}var mte=j('<span role="none" class="type svelte-12y2c75"> </span>'),vte=j('<div role="none" class="header svelte-12y2c75"><div role="none" class="svelte-12y2c75"><!></div> <div role="none" class="svelte-12y2c75"><!></div> <div role="none" class="svelte-12y2c75"><!></div></div>');const _te={hash:"svelte-12y2c75",code:".header.svelte-12y2c75 {display:flex;align-items:center;gap:8px;height:24px;background-color:var(--sui-secondary-border-color);}.header.svelte-12y2c75 > div:where(.svelte-12y2c75) {display:flex;align-items:center;}.header.svelte-12y2c75 > div:where(.svelte-12y2c75):first-child {justify-content:flex-start;width:40%;}.header.svelte-12y2c75 > div:where(.svelte-12y2c75):nth-child(2) {width:20%;justify-content:center;}.header.svelte-12y2c75 > div:where(.svelte-12y2c75):last-child {width:40%;justify-content:flex-end;}.header.svelte-12y2c75 button {padding:0;height:16px;}.header.svelte-12y2c75 .type:where(.svelte-12y2c75) {font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-bold);color:var(--sui-secondary-foreground-color);}"};function P1(t,e){ae(e,!0),ke(t,_te);const n=()=>H(ce,"$_",r),[r,i]=ve();let o=N(e,"label",3,""),a=N(e,"expanded",15),s=N(e,"centerContent",3,void 0),l=N(e,"endContent",3,void 0);var u=vte(),d=F(u),f=F(d);{const v=y=>{jR(y,{get expanded(){return a()}})};let b=_(()=>a()?n()("collapse"):n()("expand"));et(f,{size:"small",get"aria-label"(){return c(b)},get"aria-expanded"(){return a()},get"aria-controls"(){return e.controlId},onclick:()=>{a(!a()),e.toggleExpanded?.()},startIcon:v,children:(y,w)=>{var x=X(),E=M(x);{var $=A=>{var k=mte(),T=F(k);Z(()=>ne(T,o())),S(A,k)};U(E,A=>{o()&&A($)})}S(y,x)},$$slots:{startIcon:!0,default:!0}})}var h=z(d,2),p=F(h);Ue(p,()=>s()??He);var g=z(h,2),m=F(g);Ue(m,()=>l()??He),S(t,u),se(),i()}const bte=({fieldConfig:t,dynamicValue:e})=>{if(e!==void 0)return e==="true";const{default:n}=t;return typeof n=="boolean"?n:!1},yte=t=>({[t.keyPath]:bte(t)}),wte=({fieldConfig:t,keyPath:e,dynamicValue:n})=>{const{default:r,output_code_only:i=!1,keys:o={code:"code",lang:"lang"}}=t,a=n!==void 0?n:r;if(i)return{[e]:typeof a=="string"?a:""};const s=$t(a)?a:void 0,l=s?.[o.code]??a,u=s?.[o.lang]??"";return{[e]:{},[`${e}.${o.code}`]:typeof l=="string"?l:"",[`${e}.${o.lang}`]:typeof u=="string"?u:""}},xte=({fieldConfig:t,dynamicValue:e})=>{const n=t,r=n.default,i=e??r;return typeof i!="string"?"":i==="{{now}}"?qP(BP(n),"",n):i},kte=t=>({[t.keyPath]:xte(t)}),P$=({fieldConfig:t,keyPath:e,dynamicValue:n})=>{const r=t,i=r.default,o=qm(r);let a="";n!==void 0?a=o?n.split(/,\s*/):n:o?a=Array.isArray(i)?i:[]:a=typeof i=="string"?i:"";const s={};return o&&Array.isArray(a)&&(a=a.map(l=>l.trim()).filter(l=>l!==""),a.length&&(s[e]=[],a.forEach((l,u)=>{s[`${e}.${u}`]=l}))),!o&&typeof a=="string"&&(s[e]=a.trim()),s},Ste=({fieldConfig:t,locale:e,dynamicValue:n})=>{const{email:r="",login:i="",name:o=""}=oe(Un),{default:a}=t,s=n??a;return typeof s!="string"?s:s.replaceAll(/{{(.+?)}}/g,(l,u)=>u==="locale"?e:u==="datetime"?new Date().toJSON().replace(/\d+\.\d+Z$/,"00.000Z"):u==="uuid"?Vi():u==="uuid_short"?Vi("short"):u==="uuid_shorter"?Vi("shorter"):u==="author-email"?r:u==="author-login"?i:u==="author-name"?o:"")},UR=t=>({[t.keyPath]:Ste(t)}),Ete=({fieldConfig:t,locale:e})=>{const{default:n}=t,r=ud({fieldConfig:t,locale:e});return $t(n)?n:r?{"":""}:{}},Tte=t=>{const{keyPath:e,dynamicValue:n}=t;let r;if(n!==void 0)try{const i=JSON.parse(n);$t(i)&&(r=i)}catch{}return r??=Ete(t),Object.fromEntries(Object.entries(r).filter(([,i])=>typeof i=="string").map(([i,o])=>[`${e}.${i}`,o]))},$te=({fieldConfig:t,keyPath:e,dynamicValue:n})=>{const{default:r}=t,{fields:i}=t,{types:o}=t;let a;if(n!==void 0?a=n.split(/,\s*/).map(u=>u.trim()).filter(u=>u!==""):a=Array.isArray(r)?r:[],!(Array.isArray(a)&&!!a.length))return{[e]:[]};const l={[e]:a};return i||o?a.forEach((u,d)=>{$t(u)?Object.entries(Pi(u)).forEach(([f,h])=>{l[`${e}.${d}.${f}`]=h}):l[`${e}.${d}`]=u}):a.forEach((u,d)=>{$t(u)||(l[`${e}.${d}`]=u)}),l},Ate=({fieldConfig:t,keyPath:e,dynamicValue:n})=>{const{default:r}=t;let i;if(n!==void 0)try{i=t3(n)}catch{i=n.replace(/<[^>]*>/g,"")}else i=r||"";return{[e]:i}},Cte=({fieldConfig:t,keyPath:e,dynamicValue:n})=>{const{default:r,value_type:i="int"}=t,o=n??r,a=typeof o=="string";if(o===void 0)return i==="int"||i==="float"?{[e]:null}:{[e]:""};if(i==="int"){const s=a?Number.parseInt(o,10):o;return Number.isInteger(s)?{[e]:s}:{}}if(i==="float"){const s=a?Number.parseFloat(o):o;return Number.isFinite(s)?{[e]:s}:{}}return a?{[e]:o}:{}},Pte=({fieldConfig:t,keyPath:e,locale:n,defaultLocale:r})=>{const{default:i}=t,{fields:o}=t,{types:a}=t,s=ud({fieldConfig:t,locale:n}),l={};return $t(i)?(Object.entries(Pi(i)).forEach(([u,d])=>{l[`${e}.${u}`]=d}),l):!s||Array.isArray(a)?(l[e]=null,l):(o&&o.length>0&&o.forEach(u=>{BR({content:l,keyPath:[e,u.name].join("."),fieldConfig:u,locale:n,defaultLocale:r,dynamicValues:{}})}),l)},O$=({fieldConfig:t,keyPath:e,dynamicValue:n})=>{const r=t,{default:i,multiple:o=!1}=r,a=n!==void 0?n.split(/,\s*/).map(l=>l.trim()):i,s=Array.isArray(a)&&!!a.length;if(!o){if(n!==void 0){const l=n.split(/,\s*/).map(u=>u.trim());return{[e]:l[0]||""}}return{[e]:a!==void 0?a:""}}return s?Object.fromEntries(a.map((l,u)=>[`${e}.${u}`,l])):{[e]:[]}},Ote={boolean:yte,code:wte,datetime:kte,file:P$,hidden:UR,image:P$,keyvalue:Tte,list:$te,markdown:Ate,number:Cte,object:Pte,relation:O$,select:O$},BR=({content:t,keyPath:e,fieldConfig:n,locale:r,defaultLocale:i,dynamicValues:o})=>{const{widget:a="string",default:s,i18n:l=!1}=n;if(r!==i&&[!1,"none"].includes(l))return;if(a==="compute"){t[e]="";return}const u=e in o&&!/\.\d+(?:\.|$)/.test(e)&&o[e].trim()||void 0,d=Ote[a];if(d){Object.assign(t,d({fieldConfig:n,keyPath:e,locale:r,defaultLocale:i,dynamicValue:u}));return}t[e]=u||s||""},ip=({fields:t,locale:e,defaultLocale:n,dynamicValues:r={}})=>{const i={};return t.forEach(o=>{BR({content:i,keyPath:o.name,fieldConfig:o,locale:e,defaultLocale:n,dynamicValues:r})}),i},L$=(t,e)=>{Object.entries(e).forEach(([n,r])=>{t[n]!==r&&(t[n]=r)}),Object.keys(t).forEach(n=>{n in e||delete t[n]})},I$=(t,e)=>{const n=new RegExp(`^${Xt(e)}\\b(?!#)`),r=Object.entries(t).filter(([i])=>n.test(i)).map(([i,o])=>[i.replace(n,"_"),o]).sort();return[zo(Object.fromEntries(r))._??[],Object.fromEntries(Object.entries(t).filter(([i])=>!n.test(i)))]},qR=({locale:t,valueStoreKey:e="currentValues",keyPath:n,manipulate:r})=>{const i=oe(Xe),{collection:o,collectionFile:a}=i,{defaultLocale:s}=(a??o)._i18n,[l,u]=I$(i[e][t],n),[d,f]=t===s?I$(i.expanderStates._,n):[[],[]];r({valueList:l,expanderStateList:d}),No.set(!1),Xe.update(h=>(L$(h[e][t],{...Pi({[n]:l}),...u}),t===s&&L$(h.expanderStates._,{...Pi({[n]:d}),...f}),h)),No.set(!0)},HR=({key:t,locale:e,collapsed:n=!1})=>{const r=oe(Xe),i=r?.expanderStates?._[t];if(i!==void 0)return i;if(n==="auto"){const o=r?.currentValues?.[e]??{},a=new RegExp(`^${Xt(t.replace(/#$/,""))}\\.[^\\.]+$`);return!Object.entries(o).some(([s,l])=>a.test(s)&&!!l)}return!n},na=t=>{Xe.update(e=>(e&&Object.entries(t).forEach(([n,r])=>{e.expanderStates._[n]!==r&&(e.expanderStates._[n]=r)}),e))},KR=({collectionName:t,fileName:e,valueMap:n,keyPath:r,isIndexFile:i=!1})=>{const o=new Set,a={collectionName:t,fileName:e,valueMap:n,isIndexFile:i};return r.split(".").forEach((s,l,u)=>{const d=u.slice(0,l+1).join("."),f=gn({...a,keyPath:d}),h=/\.\d+$/.test(d);if(f?.widget==="object")h&&o.add(d),o.add(`${d}#`);else if(f?.widget==="list")o.add(h?d:`${d}#`);else if(l>0){const p=u.slice(0,l).join("."),g=gn({...a,keyPath:p});g?.widget==="object"&&"fields"in g&&o.add(`${p}.${g.name}#`),g?.widget==="list"&&"field"in g&&o.add(d)}}),[...o]},Lte=({collectionName:t,fileName:e,currentValues:n})=>{const{validities:r,isIndexFile:i}=oe(Xe),o={};Object.entries(r??{}).forEach(([a,s])=>{Object.entries(s).forEach(([l,{valid:u}])=>{u||KR({collectionName:t,fileName:e,valueMap:n[a],keyPath:l,isIndexFile:i}).forEach(d=>{o[d]=!0})})}),na(o)};var Ite=j("<!> <!>",1),Nte=j('<div role="none" class="toolbar top add svelte-1eiee9e"><!></div>'),Rte=j("<!> <!> <!>",1),Mte=j("<!> <!>",1),Dte=j("<!> <!>",1),Fte=j("<!> <!>",1),zte=j("<!> <!>",1),jte=j('<div role="none" class="summary svelte-1eiee9e"><!> <!></div>'),Ute=j('<div role="none" class="item svelte-1eiee9e"><!> <div role="none" class="item-body"><!></div></div>'),Bte=j('<div role="none" class="toolbar bottom add svelte-1eiee9e"><!> <!></div>'),qte=j('<div role="none" class="toolbar top svelte-1eiee9e"><!> <div role="none" class="summary"> </div> <!> <!></div> <!> <div role="none"></div> <!>',1);const Hte={hash:"svelte-1eiee9e",code:".toolbar.svelte-1eiee9e {display:flex;align-items:center;}.toolbar.top.add.svelte-1eiee9e {margin-block:8px 16px !important;}.toolbar.bottom.add.svelte-1eiee9e {margin-block:16px 0 !important;}.item-list.collapsed.svelte-1eiee9e {display:none;}.item.svelte-1eiee9e {margin:16px 0;border-width:2px;border-color:var(--sui-secondary-border-color);border-radius:var(--sui-control-medium-border-radius);}.item.svelte-1eiee9e .summary:where(.svelte-1eiee9e) {display:flex;align-items:center;gap:8px;padding:8px;}.item.svelte-1eiee9e .summary:where(.svelte-1eiee9e):empty {display:none;}"};function Kte(t,e){const n=Jn();ae(e,!0),ke(t,Hte);const r=()=>H(Xe,"$entryDraft",a),i=()=>H(ce,"$_",a),o=()=>H(mn,"$isSmallScreen",a),[a,s]=ve(),{valueStoreKey:l="currentValues"}=pr("field-editor")??{},u=_(()=>e.fieldConfig.name),d=_(()=>e.fieldConfig.label),f=_(()=>e.fieldConfig.i18n),h=_(()=>at(e.fieldConfig.allow_add,!0)),p=_(()=>at(e.fieldConfig.allow_remove,!0)),g=_(()=>at(e.fieldConfig.allow_reorder,!0)),m=_(()=>e.fieldConfig.collapsed),v=_(()=>e.fieldConfig.summary),b=_(()=>e.fieldConfig.thumbnail),y=_(()=>at(e.fieldConfig.minimize_collapsed,!1)),w=_(()=>e.fieldConfig.label_singular),x=_(()=>at(e.fieldConfig.max,1/0)),E=_(()=>at(e.fieldConfig.add_to_top,!1)),$=_(()=>e.fieldConfig.field),A=_(()=>e.fieldConfig.fields),k=_(()=>e.fieldConfig.types),T=_(()=>at(e.fieldConfig.typeKey,"type")),C=_(()=>hd(e.fieldConfig)),P=_(()=>c(C).hasSingleSubField),O=_(()=>c(C).hasVariableTypes),I=_(()=>new RegExp(`^${Xt(e.keyPath)}\\.(\\d+)(.*)?`)),L=_(()=>r()?.isIndexFile??!1),D=_(()=>r()?.collection),B=_(()=>r()?.collectionName??""),K=_(()=>r()?.collectionFile),G=_(()=>r()?.fileName),W=_(()=>(c(K)??c(D))?._i18n??Go),Y=_(()=>c(W).defaultLocale),R=_(()=>e.locale!==c(Y)&&c(f)==="duplicate"),q=_(()=>Kn(r()?.[l][e.locale])??{}),J=_(()=>`${e.keyPath}#`),Q=_(()=>r()?.expanderStates?._[c(J)]??!0),ee=_(()=>zo(Object.fromEntries(Object.entries(c(q)).filter(([pe])=>c(I).test(pe)).map(([pe,Le])=>[pe.replace(new RegExp(`^${Xt(e.keyPath)}`),c(u)),Le])))[c(u)]??[]),re=_(()=>c(ee).map((pe,Le)=>{const Ne=`${e.keyPath}.${Le}`;return[Ne,r()?.expanderStates?._[Ne]??!0]})),te=_(()=>c(ee).length>=c(x)),de=At([]),he=()=>{na({[c(J)]:c(y)==="auto"?!c(ee).length:!c(y),...Object.fromEntries(c(ee).map((pe,Le)=>{const Ne=`${e.keyPath}.${Le}`;return[Ne,HR({key:Ne,locale:e.locale,collapsed:c(m)})]}))})},ue=pe=>{Object.keys(r()?.[l]??{}).forEach(Le=>{c(f)!=="duplicate"&&Le!==e.locale||qR({locale:Le,valueStoreKey:l,keyPath:e.keyPath,manipulate:pe})})},ge=({index:pe=c(E)?0:c(ee).length,dupIndex:Le,type:Ne}={})=>{ue(({valueList:nt,expanderStateList:We})=>{const Ze=Ne?c(k)?.find(({name:_t})=>_t===Ne)?.fields??[]:c(A)??(c($)?[c($)]:[]),st=(()=>{if(typeof Le=="number")return structuredClone(nt[Le]);const _t=zo(ip({fields:Ze,locale:e.locale,defaultLocale:c(Y)}));return c(P)&&c($)?_t[c($).name]:_t})();Ne&&(st[c(T)]=Ne),c(P)||(st.__sc_item_id=crypto.randomUUID()),nt.splice(pe,0,st),We.splice(pe,0,!0)}),na({[c(J)]:!0})},ye=pe=>{ue(({valueList:Le,expanderStateList:Ne})=>{Le.splice(pe,1),Ne.splice(pe,1)})},me=pe=>{ue(({valueList:Le,expanderStateList:Ne})=>{c(P)||(Le[pe].__sc_item_id??=crypto.randomUUID(),Le[pe+1].__sc_item_id??=crypto.randomUUID()),[Le[pe],Le[pe+1]]=[Le[pe+1],Le[pe]],[Ne[pe],Ne[pe+1]]=[Ne[pe+1],Ne[pe]]})},Ae=(pe,Le)=>H4({collectionName:c(B),fileName:c(G),keyPath:e.keyPath,valueMap:c(q),locale:e.locale,summaryTemplate:Le,hasSingleSubField:c(P),index:pe,isIndexFile:c(L)}),Ce=async pe=>{if(!c(b))return;const Le=`${e.keyPath}.${pe}.${c(b).replace(/^fields\./,"")}`,Ne=c(q)[Le];if(!(!Ne||gn({collectionName:c(B),fileName:c(G),valueMap:c(q),keyPath:Le,isIndexFile:c(L)})?.widget!=="image"))return ql({value:Ne,entry:r()?.originalEntry,collectionName:c(B),fileName:c(G)})},_e=async()=>{c(b)&&(de.length=c(ee).length,c(ee).forEach(async(pe,Le)=>{const Ne=await Ce(Le);de[Le]!==Ne&&(de[Le]=Ne)}))};ze(()=>{c(ee),xe(()=>{_e()})}),Vt(()=>{he()});var fe=qte(),be=M(fe),Oe=F(be);{const pe=nt=>{jR(nt,{get expanded(){return c(Q)}})};let Le=_(()=>!c(ee).length),Ne=_(()=>c(Q)?i()("collapse"):i()("expand"));et(Oe,{iconic:!0,get disabled(){return c(Le)},get"aria-label"(){return c(Ne)},get"aria-expanded"(){return c(Q)},get"aria-controls"(){return`list-${n}-item-list`},onclick:()=>{na({[c(J)]:!c(Q)})},startIcon:pe,$$slots:{startIcon:!0}})}var je=z(Oe,2),Re=F(je),Ie=z(je,2);_i(Ie,{flex:!0});var Pe=z(Ie,2);{var $e=pe=>{var Le=Ite(),Ne=M(Le);{let We=_(()=>i()("expand_all")),Ze=_(()=>c(re).every(([,st])=>st));et(Ne,{variant:"tertiary",size:"small",get label(){return c(We)},get disabled(){return c(Ze)},onclick:()=>{na(Object.fromEntries(c(re).map(([st])=>[st,!0])))}})}var nt=z(Ne,2);{let We=_(()=>i()("collapse_all")),Ze=_(()=>c(re).every(([,st])=>!st));et(nt,{variant:"tertiary",size:"small",get label(){return c(We)},get disabled(){return c(Ze)},onclick:()=>{na(Object.fromEntries(c(re).map(([st])=>[st,!1])))}})}S(pe,Le)};U(Pe,pe=>{c(Q)&&c(ee).length>1&&pe($e)})}var Ee=z(be,2);{var qe=pe=>{var Le=Nte(),Ne=F(Le);dw(Ne,{get disabled(){return c(R)},get fieldConfig(){return e.fieldConfig},get items(){return c(ee)},addItem:ge}),S(pe,Le)};U(Ee,pe=>{c(h)&&(c(E)||!c(ee).length)&&pe(qe)})}var Ke=z(Ee,2);let lt;rt(Ke,23,()=>c(ee),(pe,Le)=>$t(pe)?pe.__sc_item_id??Le:Le,(pe,Le,Ne)=>{yo(pe,{children:(nt,We)=>{const Ze=_(()=>`${e.keyPath}.${c(Ne)}`),st=_(()=>r()?.expanderStates?._[c(Ze)]??!0),_t=_(()=>c(O)?c(k)?.find(({name:vn})=>vn===c(Le)[c(T)]):void 0),Ft=_(()=>c(O)?c(_t)?.fields??[]:c(A)??(c($)?[c($)]:[])),ln=_(()=>c(O)&&c(_t)?.summary||c(v));var qt=Ute(),Et=F(qt);{const vn=ut=>{var pt=X(),_n=M(pt);{var Rn=Pn=>{var bn=Rte(),un=M(bn);{const kr=Tt=>{Qe(Tt,{name:"arrow_upward"})};let Ht=_(()=>c(R)||c(Ne)===0),Si=_(()=>i()("move_up"));et(un,{size:"small",iconic:!0,get disabled(){return c(Ht)},get"aria-label"(){return c(Si)},onclick:()=>me(c(Ne)-1),startIcon:kr,$$slots:{startIcon:!0}})}var yn=z(un,2);_i(yn,{});var It=z(yn,2);{const kr=Tt=>{Qe(Tt,{name:"arrow_downward"})};let Ht=_(()=>c(R)||c(Ne)===c(ee).length-1),Si=_(()=>i()("move_down"));et(It,{iconic:!0,size:"small",get disabled(){return c(Ht)},get"aria-label"(){return c(Si)},onclick:()=>me(c(Ne)),startIcon:kr,$$slots:{startIcon:!0}})}S(Pn,bn)};U(_n,Pn=>{c(g)&&Pn(Rn)})}S(ut,pt)},Xn=ut=>{var pt=zte(),_n=M(pt);{var Rn=un=>{{const yn=kr=>{{let Ht=_(()=>i()("translation_options"));xr(kr,{get"aria-label"(){return c(Ht)},children:(Si,Tt)=>{var ni=Fte(),Fi=M(ni);{let ft=_(()=>i()("duplicate"));vt(Fi,{get label(){return c(ft)},get disabled(){return c(te)},onclick:()=>ge({index:c(Ne)+1,dupIndex:c(Ne)})})}var oo=z(Fi,2);{var ds=ft=>{var Ct=Mte(),dn=M(Ct);{const mr=Zn=>{var Mn=X(),qr=M(Mn);rt(qr,17,()=>c(k)??[],({name:Hr,label:Ei})=>Hr,(Hr,Ei)=>{let Gn=()=>c(Ei).name,Or=()=>c(Ei).label;{let ri=_(()=>Or()||Gn());vt(Hr,{get label(){return c(ri)},onclick:()=>ge({index:c(Ne),type:Gn()})})}}),S(Zn,Mn)};let ko=_(()=>i()("add_item_above"));vt(dn,{get label(){return c(ko)},get disabled(){return c(te)},items:mr,$$slots:{items:!0}})}var sr=z(dn,2);{const mr=Zn=>{var Mn=X(),qr=M(Mn);rt(qr,17,()=>c(k)??[],({name:Hr,label:Ei})=>Hr,(Hr,Ei)=>{let Gn=()=>c(Ei).name,Or=()=>c(Ei).label;{let ri=_(()=>Or()||Gn());vt(Hr,{get label(){return c(ri)},onclick:()=>ge({index:c(Ne)+1,type:Gn()})})}}),S(Zn,Mn)};let ko=_(()=>i()("add_item_below"));vt(sr,{get label(){return c(ko)},get disabled(){return c(te)},items:mr,$$slots:{items:!0}})}S(ft,Ct)},On=ft=>{var Ct=Dte(),dn=M(Ct);{let mr=_(()=>i()("add_item_above"));vt(dn,{get label(){return c(mr)},get disabled(){return c(te)},onclick:()=>ge({index:c(Ne)})})}var sr=z(dn,2);{let mr=_(()=>i()("add_item_below"));vt(sr,{get label(){return c(mr)},get disabled(){return c(te)},onclick:()=>ge({index:c(Ne)+1})})}S(ft,Ct)};U(oo,ft=>{c(O)?ft(ds):ft(On,!1)})}S(Si,ni)},$$slots:{default:!0}})}};let It=_(()=>i()("list_item_options"));ei(un,{variant:"ghost",size:"small",iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return c(It)},get disabled(){return c(R)},popup:yn,$$slots:{popup:!0}})}};U(_n,un=>{c(h)&&un(Rn)})}var Pn=z(_n,2);{var bn=un=>{{const yn=kr=>{Qe(kr,{name:"close"})};let It=_(()=>i()("remove"));et(un,{variant:"ghost",size:"small",iconic:!0,get"aria-label"(){return c(It)},onclick:()=>ye(c(Ne)),startIcon:yn,$$slots:{startIcon:!0}})}};U(Pn,un=>{c(p)&&un(bn)})}S(ut,pt)};let kt=_(()=>c(O)?c(_t)?.label||c(_t)?.name:""),cn=_(()=>c(Ft).length?()=>na({[c(Ze)]:!c(st)}):void 0);P1(Et,{get label(){return c(kt)},get controlId(){return`list-${n}-item-${c(Ne)??""}-body`},get expanded(){return c(st)},get toggleExpanded(){return c(cn)},centerContent:vn,endContent:Xn,$$slots:{centerContent:!0,endContent:!0}})}var Yt=z(Et,2),wt=F(Yt);{var Lt=vn=>{var Xn=X(),kt=M(Xn);rt(kt,17,()=>c(Ft),cn=>cn.name,(cn,ut)=>{yo(cn,{children:(pt,_n)=>{{let Rn=_(()=>c(P)?c(Ze):`${c(Ze)}.${c(ut).name}`),Pn=_(()=>c(O)?`${e.keyPath}.*<${c(Le)[c(T)]}>.${c(ut).name}`:`${e.keyPath}.*.${c(ut).name}`),bn=_(()=>c(P)?"single-subfield-list-widget":void 0);kv(pt,{get keyPath(){return c(Rn)},get typedKeyPath(){return c(Pn)},get locale(){return e.locale},get fieldConfig(){return c(ut)},get context(){return c(bn)}})}},$$slots:{default:!0}})}),S(vn,Xn)},gr=vn=>{var Xn=jte(),kt=F(Xn);{var cn=pt=>{bv(pt,{get src(){return de[c(Ne)]},variant:"icon",cover:!0})};U(kt,pt=>{de[c(Ne)]&&pt(cn)})}var ut=z(kt,2);{let pt=_(()=>o()?2:1);Ur(ut,{get lines(){return c(pt)},children:(_n,Rn)=>{var Pn=Fe();Z(bn=>ne(Pn,bn),[()=>Ae(c(Ne),c(ln))]),S(_n,Pn)},$$slots:{default:!0}})}S(vn,Xn)};U(wt,vn=>{c(st)?vn(Lt):vn(gr,!1)})}Z(()=>Se(Yt,"id",`list-${n}-item-${c(Ne)??""}-body`)),S(nt,qt)},$$slots:{default:!0}})});var Te=z(Ke,2);{var Me=pe=>{var Le=Bte(),Ne=F(Le);dw(Ne,{get disabled(){return c(R)},get fieldConfig(){return e.fieldConfig},get items(){return c(ee)},addItem:ge});var nt=z(Ne,2);_i(nt,{flex:!0}),S(pe,Le)};U(Te,pe=>{c(h)&&!c(E)&&c(ee).length&&pe(Me)})}Z(()=>{Se(je,"id",`object-${n}-summary`),ne(Re,`${c(ee).length??""}
|
|
654
|
-
${((c(ee).length===1?c(w):void 0)||c(d)||c(u))??""}`),Se(Ke,"id",`list-${n}-item-list`),lt=hn(Ke,1,"item-list svelte-1eiee9e",null,lt,{collapsed:!c(Q)})}),S(t,fe),se(),s()}function Vte(t,e){ae(e,!0);const n=()=>H(Xe,"$entryDraft",r),[r,i]=ve(),{valueStoreKey:o="currentValues"}=pr("field-editor")??{};let a=N(e,"required",3,!0),
|
|
655
|
-
`)??"",!0)},
|
|
656
|
-
`),!0),p(m)};Vt(()=>(V(u,!0),window.addEventListener("BeforeEntrySave",g),()=>{window.removeEventListener("BeforeEntrySave",g)})),ze(()=>{c(u)&&(e.currentValue,xe(()=>{h()}))}),Zh(t,{autoResize:!0,flex:!0,get readonly(){return s()},get required(){return a()},get invalid(){return l()},get"aria-errormessage"(){return`${e.fieldId??""}-error`},oninput:()=>{p()},get value(){return c(d)},set value(m){V(d,m,!0)}}),se(),i()}function Gte(t,e){const n=Jn();ae(e,!0);let r=ot(e,["$$slots","$$events","$$legacy","fieldConfig"]);ma(t,{get"aria-labelledby"(){return`list-${n}-summary`},children:(i,o)=>{var a=X(),s=M(a);{var l=d=>{{let f=_(()=>({...r,fieldConfig:e.fieldConfig}));Kte(d,Qt(()=>c(f)))}},u=d=>{{let f=_(()=>({...r,fieldConfig:e.fieldConfig}));Vte(d,Qt(()=>c(f)))}};U(s,d=>{hd(e.fieldConfig).hasSubFields?d(l):d(u,!1)})}S(i,a)},$$slots:{default:!0}}),se()}var Wte=j('<section role="group" tabindex="0" class="svelte-s650n2"><h4 class="svelte-s650n2"> </h4> <!></section>');const Yte={hash:"svelte-s650n2",code:`[role='document'] section.svelte-s650n2 {overflow:hidden;margin:8px 0;padding:8px 0;}[role='document'] section.svelte-s650n2 h4:where(.svelte-s650n2) {color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);}[role='document'] section.svelte-s650n2 h4:where(.svelte-s650n2):not(:last-child) {margin-bottom:8px;}[role='document'] section.svelte-s650n2 > * {margin-inline:auto;max-width:768px;}[role='document'] section.svelte-s650n2 p {margin:8px auto 0;-webkit-user-select:text;user-select:text;}[role='document'] section.svelte-s650n2 img {max-height:800px !important;}
|
|
654
|
+
${((c(ee).length===1?c(w):void 0)||c(d)||c(u))??""}`),Se(Ke,"id",`list-${n}-item-list`),lt=hn(Ke,1,"item-list svelte-1eiee9e",null,lt,{collapsed:!c(Q)})}),S(t,fe),se(),s()}function Vte(t,e){ae(e,!0);const n=()=>H(Xe,"$entryDraft",r),[r,i]=ve(),{valueStoreKey:o="currentValues"}=pr("field-editor")??{};let a=N(e,"currentValue",7),s=N(e,"required",3,!0),l=N(e,"readonly",3,!1),u=N(e,"invalid",3,!1),d=ie(!1),f=ie("");const h=_(()=>e.fieldConfig.i18n),p=()=>{V(f,a()?.join(`
|
|
655
|
+
`)??"",!0)},g=(v=c(f).split(/\n/g))=>{Object.keys(n()?.[o]??{}).forEach(b=>{c(h)!=="duplicate"&&b!==e.locale||(Object.keys(n()?.[o][b]??{}).forEach(y=>{y.match(`^${Xt(e.keyPath)}\\.\\d+$`)&&delete n()?.[o][b][y]}),v.forEach((y,w)=>{bt(Xe,xe(n)[o][b][`${e.keyPath}.${w}`]=y,xe(n))}))})},m=()=>{a(c(f).split(/\n/g).map(v=>v.trim()).filter(v=>!!v)),g(a())};Vt(()=>{V(d,!0)}),ze(()=>{c(d)&&(a(),xe(()=>{p()}))}),Zh(t,{autoResize:!0,flex:!0,get readonly(){return l()},get required(){return s()},get invalid(){return u()},get"aria-errormessage"(){return`${e.fieldId??""}-error`},oninput:()=>{g()},onblur:()=>{m()},get value(){return c(f)},set value(v){V(f,v,!0)}}),se(),i()}function Gte(t,e){const n=Jn();ae(e,!0);let r=ot(e,["$$slots","$$events","$$legacy","fieldConfig"]);ma(t,{get"aria-labelledby"(){return`list-${n}-summary`},children:(i,o)=>{var a=X(),s=M(a);{var l=d=>{{let f=_(()=>({...r,fieldConfig:e.fieldConfig}));Kte(d,Qt(()=>c(f)))}},u=d=>{{let f=_(()=>({...r,fieldConfig:e.fieldConfig}));Vte(d,Qt(()=>c(f)))}};U(s,d=>{hd(e.fieldConfig).hasSubFields?d(l):d(u,!1)})}S(i,a)},$$slots:{default:!0}}),se()}var Wte=j('<section role="group" tabindex="0" class="svelte-s650n2"><h4 class="svelte-s650n2"> </h4> <!></section>');const Yte={hash:"svelte-s650n2",code:`[role='document'] section.svelte-s650n2 {overflow:hidden;margin:8px 0;padding:8px 0;}[role='document'] section.svelte-s650n2 h4:where(.svelte-s650n2) {color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);}[role='document'] section.svelte-s650n2 h4:where(.svelte-s650n2):not(:last-child) {margin-bottom:8px;}[role='document'] section.svelte-s650n2 > * {margin-inline:auto;max-width:768px;}[role='document'] section.svelte-s650n2 p {margin:8px auto 0;-webkit-user-select:text;user-select:text;}[role='document'] section.svelte-s650n2 img {max-height:800px !important;}
|
|
657
656
|
|
|
658
657
|
@media (width < 768px) {[role='document'] > section.svelte-s650n2:is([data-widget=file]:where(.svelte-s650n2), [data-widget=image]:where(.svelte-s650n2)):has(img), [role='document'] > section.svelte-s650n2:is([data-widget=string]:where(.svelte-s650n2)):has(iframe) {overflow:visible;}[role='document'] > section.svelte-s650n2:is([data-widget=file]:where(.svelte-s650n2), [data-widget=image]:where(.svelte-s650n2)) img {width:100%;max-height:none !important;}
|
|
659
658
|
}`};function O1(t,e){ae(e,!0),ke(t,Yte);const n=()=>H(Xe,"$entryDraft",r),[r,i]=ve(),o=_(()=>e.fieldConfig.name),a=_(()=>at(e.fieldConfig.widget,"string")),s=_(()=>at(e.fieldConfig.i18n,!1)),l=_(()=>at(e.fieldConfig.label,"")),u=_(()=>at(e.fieldConfig.preview,!0)),d=_(()=>cd(e.fieldConfig)),f=_(()=>c(a)==="list"||c(d)),h=_(()=>n()?.isIndexFile??!1),p=_(()=>n()?.collection),g=_(()=>n()?.collectionName??""),m=_(()=>n()?.collectionFile),v=_(()=>n()?.fileName),b=_(()=>Kn(n()?.currentValues[e.locale]??{})),y=_(()=>KR({collectionName:c(g),fileName:c(v),valueMap:c(b),keyPath:e.keyPath,isIndexFile:c(h)})),w=_(()=>(c(m)??c(p))?._i18n??Go),x=_(()=>c(w).i18nEnabled),E=_(()=>c(w).defaultLocale),$=_(()=>c(x)&&(c(s)===!0||c(s)==="translate")),A=_(()=>c(x)&&c(s)==="duplicate"),k=_(()=>new RegExp(`^${Xt(e.keyPath)}\\.\\d+$`)),T=_(()=>c(f)?Object.entries(c(b)).filter(([L])=>c(k).test(L)).map(([,L])=>L).filter(L=>L!==void 0):c(b)[e.keyPath]),C=()=>{na(Object.fromEntries(c(y).map(L=>[L,!0]))),window.requestAnimationFrame(()=>{const L=document.querySelector(`.content-editor .pane[data-mode="edit"] .field[data-key-path="${CSS.escape(e.keyPath)}"]`);if(L){typeof L.scrollIntoViewIfNeeded=="function"?L.scrollIntoViewIfNeeded():L.scrollIntoView();const D=L.querySelector(".widget-wrapper");(D?.querySelector('[contenteditable="true"], [tabindex="0"]')??D?.querySelector("input, textarea, button"))?.focus()}})};var P=X(),O=M(P);{var I=L=>{var D=Wte();D.__keydown=Y=>{Y.key==="Enter"&&(Y.stopPropagation(),C())},D.__click=Y=>{Y.stopPropagation(),C()};var B=F(D),K=F(B),G=z(B,2);{var W=Y=>{const R=_(()=>R$[c(a)]);var q=X(),J=M(q);br(J,()=>c(R),(Q,ee)=>{ee(Q,{get keyPath(){return e.keyPath},get typedKeyPath(){return e.typedKeyPath},get locale(){return e.locale},get fieldConfig(){return e.fieldConfig},get currentValue(){return c(T)}})}),S(Y,q)};U(G,Y=>{c(a)in R$&&Y(W)})}Z(()=>{Se(D,"data-widget",c(a)),Se(D,"data-key-path",e.keyPath),Se(D,"data-typed-key-path",e.typedKeyPath),ne(K,c(l)||c(o))}),S(L,D)};U(O,L=>{c(a)!=="hidden"&&c(u)&&(e.locale===c(E)||c($)||c(A))&&L(I)})}S(t,P),se(),i()}lc(["keydown","click"]);var Jte=j('<div role="none" class="header svelte-1fo9sk9"> </div>'),Xte=j('<div role="group" class="subsection svelte-1fo9sk9"><!> <div role="none" class="items svelte-1fo9sk9"><!></div></div>');const Zte={hash:"svelte-1fo9sk9",code:".subsection.svelte-1fo9sk9 {margin:16px auto;border:2px solid var(--sui-secondary-border-color);border-radius:var(--sui-control-medium-border-radius);}.subsection.svelte-1fo9sk9 .title {font-size:inherit;font-weight:var(--sui-font-weight-normal);}.header.svelte-1fo9sk9 {display:flex;align-items:center;height:24px;padding-inline:8px;color:var(--sui-secondary-foreground-color);background-color:var(--sui-secondary-border-color);font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-bold);}.items.svelte-1fo9sk9 {padding:8px 16px;}.items.svelte-1fo9sk9:empty {display:none;}"};function VR(t,e){const n=Jn();ke(t,Zte);const r=`${n}-header`;var i=Xte(),o=F(i);{var a=u=>{var d=Jte(),f=F(d);Z(()=>{Se(d,"id",r),ne(f,e.label)}),S(u,d)};U(o,u=>{e.label&&u(a)})}var s=z(o,2),l=F(s);Ue(l,()=>e.children??He),Z(()=>Se(i,"aria-labelledby",e.label?r:void 0)),S(t,i)}function Qte(t,e){ae(e,!0);const n=()=>H(Xe,"$entryDraft",r),[r,i]=ve(),o=_(()=>e.fieldConfig.name),a=_(()=>e.fieldConfig.field),s=_(()=>e.fieldConfig.fields),l=_(()=>e.fieldConfig.types),u=_(()=>at(e.fieldConfig.typeKey,"type")),d=_(()=>hd(e.fieldConfig)),f=_(()=>c(d).hasSingleSubField),h=_(()=>c(d).hasVariableTypes),p=_(()=>new RegExp(`^${Xt(e.keyPath)}\\.\\d+`)),g=_(()=>zo(Object.fromEntries(Object.entries(Kn(n()?.currentValues[e.locale])??{}).filter(([b])=>c(p).test(b)).map(([b,y])=>[b.replace(new RegExp(`^${Xt(e.keyPath)}`),c(o)),y])))[c(o)]??[]);var m=X(),v=M(m);rt(v,19,()=>c(g),(b,y)=>$t(b)?b.__sc_item_id??y:y,(b,y,w)=>{yo(b,{children:(x,E)=>{const $=_(()=>`${e.keyPath}.${c(w)}`),A=_(()=>Array.isArray(c(l))?n()?.currentValues[e.locale][`${c($)}.${c(u)}`]:void 0),k=_(()=>c(l)?.find(({name:P})=>P===c(A))),T=_(()=>c(k)?c(k).label||c(k).name:void 0),C=_(()=>c(A)?c(k)?.fields??[]:c(s)??(c(a)?[c(a)]:[]));VR(x,{get label(){return c(T)},children:(P,O)=>{var I=X(),L=M(I);rt(L,17,()=>c(C),D=>D.name,(D,B)=>{yo(D,{children:(K,G)=>{{let W=_(()=>c(f)?c($):`${c($)}.${c(B).name}`),Y=_(()=>c(h)?`${e.keyPath}.*<${c(A)}>.${c(B).name}`:`${e.keyPath}.*.${c(B).name}`);O1(K,{get keyPath(){return c(W)},get typedKeyPath(){return c(Y)},get locale(){return e.locale},get fieldConfig(){return c(B)}})}},$$slots:{default:!0}})}),S(P,I)}})},$$slots:{default:!0}})}),S(t,m),se(),i()}var ene=j("<li> </li>"),tne=j('<ul dir="auto"></ul>');function nne(t,e){ae(e,!0);var n=X(),r=M(n);{var i=o=>{var a=tne();rt(a,21,()=>e.currentValue,yr,(s,l)=>{var u=ene(),d=F(u);Z(()=>ne(d,c(l))),S(s,u)}),Z(s=>{Se(a,"lang",s),a.dir=a.dir},[()=>jr(e.locale)]),S(o,a)};U(r,o=>{Array.isArray(e.currentValue)&&e.currentValue.length&&o(i)})}S(t,n),se()}function rne(t,e){ae(e,!0);let n=ot(e,["$$slots","$$events","$$legacy","fieldConfig"]);var r=X(),i=M(r);{var o=s=>{{let l=_(()=>({...n,fieldConfig:e.fieldConfig}));Qte(s,Qt(()=>c(l)))}},a=s=>{{let l=_(()=>({...n,fieldConfig:e.fieldConfig}));nne(s,Qt(()=>c(l)))}};U(i,s=>{hd(e.fieldConfig).hasSubFields?s(o):s(a,!1)})}S(t,r),se()}var ine=j('<div role="alert" class="search-result searching svelte-s9eab1"> </div>'),one=j('<div role="alert" class="search-result no-result svelte-s9eab1"> </div>'),ane=j('<div role="none" class="toolbar svelte-s9eab1"><!> <!> <!></div> <!> <div class="map-wrapper svelte-s9eab1"><!></div> <!>',1);const sne={hash:"svelte-s9eab1",code:".toolbar.svelte-s9eab1 {display:flex;align-items:center;margin-bottom:var(--sui-spacing-2x);}.search-result.svelte-s9eab1 {padding:12px;color:var(--sui-secondary-foreground-color);}.map-wrapper.svelte-s9eab1 {display:contents;}.map-wrapper.svelte-s9eab1 .map {aspect-ratio:auto;height:400px;}.map-wrapper.svelte-s9eab1 .map.invalid {border-color:var(--sui-error-border-color);}"};function lne(t,e){ae(e,!0),ke(t,sne);const n=()=>H(ce,"$_",r),[r,i]=ve();let o=N(e,"currentValue",15),a=N(e,"readonly",3,!1),s=N(e,"invalid",3,!1);const l=_(()=>at(e.fieldConfig.decimals,7)),u=_(()=>at(e.fieldConfig.type,"Point")),d=_(()=>c(u).toLowerCase());let f=ie(void 0),h=ie(void 0),p=ie(""),g=ie(""),m=ie(void 0),v=ie(!1),b=ie(!1),y=ie(""),w=0,x;const E=async({leaflet:ee,map:re})=>{x=re;const{TerraDraw:te,TerraDrawLineStringMode:de,TerraDrawPointMode:he,TerraDrawPolygonMode:ue}=await Cu("terra-draw","dist/terra-draw.module.js"),{TerraDrawLeafletAdapter:ge}=await Cu("terra-draw-leaflet-adapter","dist/terra-draw-leaflet-adapter.module.js?module"),ye={Point:he,LineString:de,Polygon:ue},me=new te({adapter:new ge({lib:ee,map:x}),modes:[new ye[c(u)]]});me.start(),me.setMode(c(d)),me.on("change",(Ae,Ce)=>{$(Ce)}),V(h,me,!0)},$=ee=>{if(!c(h))return;const re=c(h).getSnapshot(),te=re[re.length-1];!te||ee!==(c(u)==="Point"?"create":"delete")||(V(p,JSON.stringify({type:c(u),coordinates:te.geometry.coordinates.map(de=>Array.isArray(de)?de.map(he=>Array.isArray(he)?he.map(ue=>dl(ue,c(l))):dl(he,c(l))):dl(de,c(l)))}),!0),re.length>1&&c(h).removeFeatures(re.filter(de=>de.id!==te.id).map(de=>de.id)))},A=()=>{if(!c(h))return;let ee=o()??"",re;try{if(ee!==void 0&&(re=JSON.parse(ee),!$t(re)||re.type!==c(u)||!Array.isArray(re.coordinates)))throw new Error("Invalid object")}catch{ee="",re=void 0}if(c(p)!==ee&&(V(p,ee,!0),c(h).clear(),re&&(c(h).addFeatures([{type:"Feature",geometry:re,properties:{mode:c(d)}}]),re.coordinates.every(te=>typeof te=="number")))){const[te,de]=re.coordinates;x?.setView([de,te],15)}},k=()=>{if(!c(h))return;const ee=c(p);o()!==ee&&o(ee)},T=()=>{window.clearTimeout(w),w=window.setTimeout(async()=>{const ee=c(g).trim();if(!ee)return;V(v,!0);const te=`https://nominatim.openstreetmap.org/search?${new URLSearchParams({q:ee,format:"jsonv2"})}`;try{V(m,await Rh(te),!0)}catch{V(m,[],!0)}V(v,!1)},500)},C=({latitude:ee,longitude:re})=>{if(!c(h)||(ee=dl(ee,c(l)),re=dl(re,c(l)),x?.setView([ee,re],15),c(u)!=="Point"))return;const te={type:"Point",coordinates:[re,ee]};c(h).clear(),c(h).addFeatures([{type:"Feature",geometry:te,properties:{mode:"point"}}]),V(p,JSON.stringify(te),!0)},P=({lat:ee,lon:re})=>{C({latitude:parseFloat(ee),longitude:parseFloat(re)})},O=()=>{if(!navigator.geolocation){V(b,!0),V(y,n()("geolocation_unsupported"),!0);return}navigator.geolocation.getCurrentPosition(({coords:{latitude:ee,longitude:re}})=>{C({latitude:ee,longitude:re})},ee=>{V(b,!0),V(y,n()("geolocation_error_body"),!0),console.error("Error getting current location:",ee)})},I=()=>{o("")};ze(()=>{c(h),o(),xe(()=>{A()})}),ze(()=>{c(p),xe(()=>{k()})}),ze(()=>{c(g),xe(()=>{T()})});var L=ane(),D=M(L),B=F(D);{let ee=_(()=>n()("find_place"));Qm(B,{get readonly(){return a()},flex:!0,get placeholder(){return c(ee)},get value(){return c(g)},set value(re){V(g,re,!0)}})}var K=z(B,2);{const ee=de=>{Qe(de,{name:"near_me"})};let re=_(()=>n()("use_your_location")),te=_(()=>n()("use_your_location"));et(K,{variant:"tertiary",iconic:!0,get title(){return c(re)},get"aria-label"(){return c(te)},get disabled(){return a()},onclick:()=>{O()},startIcon:ee,$$slots:{startIcon:!0}})}var G=z(K,2);{let ee=_(()=>n()("clear")),re=_(()=>a()||!o());et(G,{variant:"tertiary",get label(){return c(ee)},get disabled(){return c(re)},onclick:()=>{I()}})}var W=z(D,2);{var Y=ee=>{var re=ine(),te=F(re);Z(de=>ne(te,de),[()=>n()("searching")]),S(ee,re)},R=ee=>{var re=X(),te=M(re);{var de=he=>{var ue=X(),ge=M(ue);{var ye=me=>{var Ae=X(),Ce=M(Ae);{var _e=be=>{{let Oe=_(()=>n()("search_results"));vd(be,{get"aria-label"(){return c(Oe)},children:(je,Re)=>{var Ie=X(),Pe=M(Ie);rt(Pe,17,()=>c(m),$e=>$e.place_id,($e,Ee)=>{Mr($e,{get label(){return c(Ee).display_name},onSelect:()=>{P(c(Ee))}})}),S(je,Ie)},$$slots:{default:!0}})}},fe=be=>{var Oe=one(),je=F(Oe);Z(Re=>ne(je,Re),[()=>n()("no_results")]),S(be,Oe)};U(Ce,be=>{c(m).length?be(_e):be(fe,!1)})}S(me,Ae)};U(ge,me=>{c(m)&&me(ye)})}S(he,ue)};U(te,he=>{c(g)&&he(de)},!0)}S(ee,re)};U(W,ee=>{c(v)?ee(Y):ee(R,!1)})}var q=z(W,2),J=F(q);{let ee=_(()=>s()?"invalid":void 0);BN(J,{get inert(){return a()},get class(){return c(ee)},onReady:E,get mapElement(){return c(f)},set mapElement(re){V(f,re,!0)}})}var Q=z(q,2);{let ee=_(()=>n()("geolocation_error_title"));Zm(Q,{get title(){return c(ee)},get open(){return c(b)},set open(re){V(b,re,!0)},children:(re,te)=>{var de=Fe();Z(()=>ne(de,c(y))),S(re,de)},$$slots:{default:!0}})}S(t,L),se(),i()}var cne=j('<pre class="svelte-ise554"> </pre>');const une={hash:"svelte-ise554",code:"pre.svelte-ise554 {white-space:pre-wrap;}"};function dne(t,e){ke(t,une);var n=X(),r=M(n);{var i=o=>{var a=cne(),s=F(a);Z(()=>ne(s,e.currentValue)),S(o,a)};U(r,o=>{e.currentValue&&o(i)})}S(t,n)}const hh=/^.+?:\w+:/,fne=["rich_text","raw"],hne={rich_text:"rich-text",raw:"plain-text"},pne=["bold","italic","strikethrough","code","link","heading-one","heading-two","heading-three","heading-four","heading-five","heading-six","bulleted-list","numbered-list","quote"],gne={bold:"bold",italic:"italic",strikethrough:"strikethrough",code:"code",link:"link","heading-one":"heading-1","heading-two":"heading-2","heading-three":"heading-3","heading-four":"heading-4","heading-five":"heading-5","heading-six":"heading-6","bulleted-list":"bulleted-list","numbered-list":"numbered-list",quote:"blockquote","code-block":"code-block"},mne=["code-block","image"];var vne=j('<div role="group" class="wrapper svelte-ykjmq3" contenteditable="false" tabindex="0"><!> <div role="none" class="item-list"><!></div></div>');const _ne={hash:"svelte-ykjmq3",code:`.wrapper.svelte-ykjmq3 {display:inline-block;border:1px solid var(--sui-secondary-border-color);border-radius:4px;width:100%;color:var(--sui-secondary-foreground-color);background-color:var(--sui-primary-background-color);white-space:normal;-webkit-user-select:none;user-select:none;}.wrapper.svelte-ykjmq3:focus {outline-color:var(--sui-primary-accent-color-translucent);}
|
|
@@ -662,7 +661,7 @@ td.svelte-18v8t2h {border-width:0;}th.svelte-18v8t2h {padding-block:4px;color:va
|
|
|
662
661
|
`),[g]=p.match(a)??[];if(!g||!p.startsWith(g))return null;const m=g.match(a),v=h+g.split(`
|
|
663
662
|
`).length-1;return m?(f.append(new e(s(m))),[!0,v]):[!1,v]},replace:()=>{},export:u}:{type:"text-match",dependencies:[e],importRegExp:a,regExp:a,replace:(d,f)=>{d.replace(new e(s(f)))},export:u}},N$=new Map,xne=t=>{const e=yne(t);return{node:e,createNode:n=>new e(n),transformer:wne({componentDef:t,CustomNode:e})}};class kne{constructor(e){const{id:n}=e,r=N$.get(n),i=r??xne(e);r||N$.set(n,i),Object.assign(this,{...e,...i})}}var Sne=j('<div role="none"><!></div>');const Ene={hash:"svelte-eev3hl",code:`.wrapper.svelte-eev3hl {display:contents;}.wrapper.minimal.svelte-eev3hl :is([role=textbox], textarea) {overflow:auto;max-height:240px;}
|
|
664
663
|
@media (width < 768px) {.wrapper.svelte-eev3hl .sui.text-editor {margin:0 calc(var(--field-editor-padding) * -1) calc(var(--field-editor-padding) * -1);width:100dvw;}.wrapper.svelte-eev3hl :is(.sui.toolbar, .lexical-root, textarea) {border:0;border-radius:0;}
|
|
665
|
-
}`};function Tne(t,e){ae(e,!0),ke(t,Ene);const n=()=>H(Xe,"$entryDraft",r),[r,i]=ve(),{widgetContext:o=void 0}=pr("field-editor")??{},a=o==="markdown-editor-component";let s=N(e,"currentValue",15),l=N(e,"required",3,!0),u=N(e,"readonly",3,!1),d=N(e,"invalid",3,!1),f=ie(void 0),h=ie(""),p=0;const g=_(()=>at(e.fieldConfig.modes,()=>[...fne],!0)),m=_(()=>at(e.fieldConfig.buttons,()=>[...pne],!0)),v=_(()=>at(e.fieldConfig.editor_components,()=>[...mne,...xg.keys()],!0)),b=_(()=>at(e.fieldConfig.linked_images,!0)),y=_(()=>at(e.fieldConfig.minimal,!1)),w=_(()=>c(g).map(D=>hne[D]).filter(Boolean)),x=_(()=>[...c(m),...c(v).includes("code-block")?["code-block"]:[]].map(D=>gne[D]).filter(Boolean)),E=_(()=>a?[]:c(v).map(D=>ZP(D==="image"&&c(b)?"linked-image":D)).filter(D=>!!D).map(D=>new kne(D))),$=_(()=>c(E).find(({id:D})=>D==="image"||D==="linked-image")),A=({target:D,images:B})=>{const K=D?.closest("div"),G=av(K);!c($)||!K?.matches(".lexical-root")||!G||B.forEach(({file:W,src:Y,alt:R=""})=>{W&&(Y=URL.createObjectURL(W));const q=()=>{if(!W||!Y)return;const J=new MutationObserver(Q=>{Q.forEach(({addedNodes:ee})=>{ee.forEach(re=>{re instanceof HTMLElement&&re.matches(".preview")&&re.querySelector(`img[src="${Y}"]`)&&(re.closest(".drop-target")?.dispatchEvent(new CustomEvent("Select",{detail:{files:[W]}})),Y?.startsWith("blob:")&&URL.revokeObjectURL(Y),J.disconnect())})})});J.observe(K,{childList:!0,subtree:!0})};G.update(()=>{yd([c($).createNode({src:Y,alt:R}),Tn()])},{onUpdate:q})})},k=async D=>{const{target:B,clipboardData:K}=D,G=K?.items;if(!G)return;let W=[];const Y=[...G].findIndex(({kind:q,type:J})=>q==="file"&&sa.includes(J)),R=[...G].findIndex(({kind:q,type:J})=>q==="string"&&J==="text/html");if(Y>-1&&R>-1){const q=Y>-1?G[Y].getAsFile():void 0;if(!q)return;G.clear(),D.stopPropagation();let J="",Q=q.name;const ee=await new Promise(re=>{G[R].getAsString(te=>{re(new DOMParser().parseFromString(te,"text/html").querySelector("img"))})});if(ee&&(J=ee.alt,/^https?:/.test(ee.src))){const re=new URL(ee.src).pathname.split("/").pop()??"";(ey.test(re)||RU.test(re))&&(Q=re)}W=[{file:new File([q],Q,{type:q.type}),alt:J}]}else W=[...K.files].filter(({type:q})=>sa.includes(q)).map(q=>({file:q}));W.length&&(W=W.map(({file:q,alt:J},Q)=>{if(q?.name==="image.png"){const{year:ee,month:re,day:te,hour:de,minute:he,second:ue}=jl(),ge=W.length>1?`-${Q+1}`:"",ye=`${ee}${re}${te}-${de}${he}${ue}${ge}.png`;q=new File([q],ye,{type:q.type})}return{file:q,alt:J}}),A({target:B,images:W}))},T=async D=>{const{target:B,dataTransfer:K}=D,G=K?.files;let W=[];if(G?.length)W=[...G].filter(({type:Y})=>sa.includes(Y)).map(Y=>({file:Y}));else{const Y=D.dataTransfer?.getData("text/html");if(Y){const R=new DOMParser().parseFromString(Y,"text/html").querySelector("img");if(R){const{src:q,alt:J}=R,Q=q.match(/^data:(?<type>image\/.+?);base64,.+/);let ee;if(Q){const re=Q.groups?.type??"";if(sa.includes(re))try{const te=await(await fetch(q)).blob(),{year:de,month:he,day:ue,hour:ge,minute:ye,second:me}=jl(),Ae=re.split("/")[1],Ce=`${de}${he}${ue}-${ge}${ye}${me}.${Ae}`;ee=new File([te],Ce,{type:re})}catch{return}}W=[{file:ee,src:q,alt:J}]}}}W.length&&A({target:B,images:W})},C=()=>{const D=typeof s()=="string"?s():"";c(h)!==D&&V(h,D,!0),!(!n()||a)&&(window.clearTimeout(p),p=window.setTimeout(()=>{Object.keys(n()?.extraValues[e.locale]??{}).forEach(B=>{const[K]=B.match(hh)??[];K?.startsWith(`${e.keyPath}:`)&&!c(f)?.querySelector(`[data-key-path-prefix="${K}"]`)&&delete n().extraValues[e.locale][B]})},500))},P=()=>{const D=c(h);s()!==D&&s(D)};ze(()=>{s(),xe(()=>{C()})}),ze(()=>{c(h),xe(()=>{P()})});var O=Sne();let I;var L=F(O);En(L,Rt,null,D=>{var B=X(),K=M(B);fr(K,()=>JSON.stringify(e.fieldConfig),G=>{{let W=_(()=>jr(e.locale));_W(G,{get lang(){return c(W)},get modes(){return c(w)},get buttons(){return c(x)},get components(){return c(E)},flex:!0,get readonly(){return u()},get required(){return l()},get invalid(){return d()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},autoResize:!0,onpastecapture:Y=>{k(Y)},ondrop:Y=>{T(Y)},get value(){return c(h)},set value(Y){V(h,Y,!0)}})}}),S(D,B)}),St(O,D=>V(f,D),()=>c(f)),Z(()=>I=hn(O,1,"wrapper svelte-eev3hl",null,I,{minimal:c(y)})),S(t,O),se(),i()}function $ne(){return{useNewRenderer:!0,renderer:{heading(...t){return Ut.Renderer.prototype.heading.call(this,...t).replace(/^<(h\d)/,'<$1 dir="auto"')},list(...t){return Ut.Renderer.prototype.list.call(this,...t).replace(/^<(ol|ul)/,'<$1 dir="auto"')},paragraph(...t){return Ut.Renderer.prototype.paragraph.call(this,...t).replace(/^<p/,'<p dir="auto"')}}}}const Ane=(...t)=>{const{alt:e,src:n,title:r}=t.at(-1),i=n.replaceAll(" ","%20");return r?``:``};var Cne=j('<div role="none" class="svelte-lijj98"><!></div>');const Pne={hash:"svelte-lijj98",code:"[role='document'] div.svelte-lijj98 :is(h1, h2, h3, h4, h5, h6, p, ul, ol) {margin:1em 0 0;}[role='document'] div.svelte-lijj98 :is(video, img) {max-width:100%;max-height:100%;}[role='document'] div.svelte-lijj98 :is(a:has(img)) {display:inline-block;}[role='document'] div.svelte-lijj98 :is(a:has(img)) img {pointer-events:none;}"};function One(t,e){ae(e,!0),ke(t,Pne);const n=()=>H(Xe,"$entryDraft",r),[r,i]=ve();let o=ie("");const a=_(()=>n()?.originalEntry),s=_(()=>n()?.collectionName??""),l=_(()=>n()?.fileName),u=_(()=>at(e.fieldConfig.sanitize_preview,!0)),d=_(()=>(e.currentValue??"").replace(oB,Ane)),f={breaks:!0,async:!0,walkTokens:async v=>{if(v.type==="image"){const b=await ql({value:v.href,entry:c(a),collectionName:c(s),fileName:c(l)});b&&(v.href=b)}}},h={ALLOWED_URI_REGEXP:/^(?:(?:(?:f|ht)tps?|mailto|tel|blob):|[^a-z]|[a-z+.-]+(?:[^a-z+.\-:]|$))/i};GB($ne()),ze(()=>{(async()=>V(o,await Yx(c(d),f),!0))()});var p=Cne(),g=F(p);{var m=v=>{var b=X(),y=M(b);_r(y,()=>c(u)?Qr.sanitize(c(o),h):c(o)),S(v,b)};U(g,v=>{typeof e.currentValue=="string"&&e.currentValue.trim()&&v(m)})}S(t,p),se(),i()}function Lne(t,e){ae(e,!0);let n=N(e,"currentValue",15),r=N(e,"required",3,!0),i=N(e,"readonly",3,!1),o=N(e,"invalid",3,!1),a=ie(void 0),s=ie("");const l=_(()=>at(e.fieldConfig.value_type,"int")),u=_(()=>e.fieldConfig.min),d=_(()=>e.fieldConfig.max),f=_(()=>at(e.fieldConfig.step,1)),h=_(()=>c(l)==="int"||c(l)==="float"),p=()=>{if(n()!==void 0){if(c(h)&&c(a)!==n())if(typeof n()=="number")V(a,n(),!0);else if(typeof n()=="string"){const w=n().trim()?Number(n()):NaN;V(a,Number.isNaN(w)?void 0:w,!0)}else V(a,void 0);!c(h)&&c(s)!==n()&&V(s,String(n()),!0)}},g=()=>{let w;c(h)?c(a)===void 0?w=NaN:c(l)==="int"?w=Number.parseInt(c(h)?String(c(a)):c(s),10):w=Number.parseFloat(c(h)?String(c(a)):c(s)):w=c(s),c(h)&&Number.isNaN(w)&&(w=null),n()!==w&&n(w)};ze(()=>{n(),xe(()=>{p()})}),ze(()=>{c(s),xe(()=>{g()})}),ze(()=>{c(a),xe(()=>{g()})});var m=X(),v=M(m);{var b=w=>{wW(w,{get min(){return c(u)},get max(){return c(d)},get step(){return c(f)},get readonly(){return i()},get required(){return r()},get invalid(){return o()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return c(a)},set value(x){V(a,x,!0)}})},y=w=>{Yn(w,{get readonly(){return i()},get required(){return r()},get invalid(){return o()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return c(s)},set value(x){V(s,x,!0)}})};U(v,w=>{c(h)?w(b):w(y,!1)})}S(t,m),se()}var Ine=j('<p dir="auto"><!></p>');function Nne(t,e){ae(e,!0);const n=_(()=>at(e.fieldConfig.value_type,"int")),r=_(()=>jr(e.locale)),i=_(()=>Intl.NumberFormat(c(r)));var o=X(),a=M(o);{var s=l=>{var u=Ine(),d=F(u);{var f=p=>{var g=Fe();Z(m=>ne(g,m),[()=>c(i).format(Number(e.currentValue))]),S(p,g)},h=p=>{var g=Fe();Z(()=>ne(g,e.currentValue)),S(p,g)};U(d,p=>{c(n)==="int"||c(n)==="float"?p(f):p(h,!1)})}Z(()=>{Se(u,"lang",c(r)),u.dir=u.dir}),S(l,u)};U(a,l=>{e.currentValue!==void 0&&e.currentValue!==null&&e.currentValue!==""&&l(s)})}S(t,o),se()}const GR=t=>{const{collectionName:e,fileName:n,collection:r,collectionFile:i,currentValues:o,isIndexFile:a}=oe(Xe),{defaultLocale:s}=(i??r)._i18n,l={...Rs(t),...Rs(o[s])},u={collectionName:e,fileName:n,valueMap:l,isIndexFile:a},d=[];return Object.keys(l).forEach(f=>{const h=gn({...u,keyPath:f});if(!h)return;const{widget:p="text",i18n:g=!1}=h;["text","string","markdown"].includes(p)&&[!0,"translate"].includes(g)&&(l[f]=t[f]??""),([!1,"none"].includes(g)||d.some(m=>new RegExp(`^${Xt(m)}\\b`).test(f)))&&(delete l[f],d.push(f))}),l},WR=t=>{Xe.update(e=>{const{fields:n,defaultLocale:r,currentLocales:i,currentValues:o,validities:a}=e,s=!i[t];if(s&&!o[t]){const{collectionName:l,fileName:u,originalValues:d}=e,f=ip({fields:n,locale:t,defaultLocale:r});return{...e,currentLocales:{...i,[t]:s},originalValues:{...d,[t]:f},currentValues:{...o,[t]:b1({draft:{collectionName:l,fileName:u},locale:t,target:GR(f)})}}}return{...e,currentLocales:{...i,[t]:s},validities:{...a,[t]:{}}}})},Rne=({collectionName:t,fileName:e,keyPath:n,valueMap:r,isIndexFile:i=!1,locale:o,summaryTemplate:a})=>{const s={collectionName:t,fileName:e,keyPath:"",valueMap:r,isIndexFile:i};return a?a.replaceAll(/{{(.+?)}}/g,(l,u)=>{const[d,...f]=u.split(/\s*\|\s*/);return dd({...s,keyPath:`${n}.${d.replace(/^fields\./,"")}`,locale:o,transformations:f})}):pO({valueMap:r,locale:o,keyPath:n,keyPathRegex:new RegExp(`^${Xt(n)}\\.`),getFieldArgs:s})};var Mne=j('<div role="none" class="summary svelte-ztn6n1"><!></div>'),Dne=j('<div role="group" class="wrapper svelte-ztn6n1"><!> <div role="none" class="item-list"><!></div></div>'),Fne=j("<!> <!> <!>",1);const zne={hash:"svelte-ztn6n1",code:".wrapper.svelte-ztn6n1 {border-width:2px;border-color:var(--sui-secondary-border-color);border-radius:var(--sui-control-medium-border-radius);}.sui.checkbox + .wrapper.svelte-ztn6n1 > .group {margin-top:8px;}.summary.svelte-ztn6n1 {padding:8px;}"};function jne(t,e){const n=Jn();ae(e,!0),ke(t,zne);const r=()=>H(Xe,"$entryDraft",a),i=()=>H(ce,"$_",a),o=()=>H(mn,"$isSmallScreen",a),[a,s]=ve(),{widgetContext:l,valueStoreKey:u="currentValues"}=pr("field-editor")??{},d=l==="single-subfield-list-widget";let f=N(e,"required",3,!0);const h=_(()=>e.fieldConfig.name),p=_(()=>at(e.fieldConfig.i18n,!1)),g=_(()=>e.fieldConfig.collapsed),m=_(()=>e.fieldConfig.summary),v=_(()=>e.fieldConfig.fields),b=_(()=>e.fieldConfig.types),y=_(()=>at(e.fieldConfig.typeKey,"type")),w=_(()=>r()?.isIndexFile??!1),x=_(()=>r()?.collection),E=_(()=>r()?.collectionName??""),$=_(()=>r()?.collectionFile),A=_(()=>r()?.fileName),k=_(()=>(c($)??c(x))?._i18n??Go),T=_(()=>c(k).defaultLocale),C=_(()=>Kn(r()?.[u][e.locale])??{}),P=_(()=>({collectionName:c(E),fileName:c(A),valueMap:c(C),isIndexFile:c(w)})),O=_(()=>Object.entries(c(C)).some(([me,Ae])=>!!me.startsWith(`${e.keyPath}.`)&&(Ae!==null||gn({...c(P),keyPath:me})?.widget==="object"))),I=_(()=>l==="markdown-editor-component"||e.locale===c(T)||c(p)!==!1),L=_(()=>`${e.keyPath}#`),D=_(()=>r()?.expanderStates?._[c(L)]??!0),B=_(()=>Array.isArray(c(b))),K=_(()=>`${e.keyPath}.${c(y)}`),G=_(()=>c(B)?c(b)?.find(({name:me})=>me===c(C)[c(K)]):void 0),W=_(()=>(c(B)?c(G)?.fields:c(v))??[]),Y=_(()=>c(B)&&c(G)?.summary||c(m)),R=_(()=>e.locale!==c(T)&&c(p)==="duplicate"),q=()=>{if(d)return;const me=c(L);na({[me]:HR({key:me,locale:e.locale,collapsed:c(g)})})},J=async({type:me}={})=>{Je(No,!1),me&&(Object.keys(r()?.[u]??{}).forEach(_e=>{(_e===e.locale||c(p)==="duplicate")&&bt(Xe,xe(r)[u][_e][c(K)]=me,xe(r))}),await El());const Ae=Object.fromEntries(Object.entries(ip({fields:c(W),locale:e.locale,defaultLocale:c(T)})).map(([_e,fe])=>[`${e.keyPath}.${_e}`,fe])),Ce=e.locale===c(T)?Ae:GR(Ae);Object.entries(r()?.[u]??{}).forEach(([_e,fe])=>{(_e===e.locale||c(p)==="duplicate")&&(bt(Xe,xe(r)[u][_e]=Object.assign(fe,Rs({...Ce,...fe})),xe(r)),delete r()[u][_e][e.keyPath])}),Je(No,!0)},Q=()=>{Je(No,!1),Object.entries(r()?.[u]??{}).forEach(([me,Ae])=>{(me===e.locale||c(p)==="duplicate")&&(Object.keys(Ae).forEach(Ce=>{Ce.startsWith(`${e.keyPath}.`)&&(bt(Xe,xe(r)[u][me][Ce]=null,xe(r)),delete r()?.[u][me][Ce])}),bt(Xe,xe(r)[u][me][e.keyPath]=null,xe(r)))}),Je(No,!0)},ee=()=>Rne({...c(P),keyPath:e.keyPath,locale:e.locale,summaryTemplate:c(Y)});Vt(()=>{q()});var re=Fne(),te=M(re);{var de=me=>{{let Ae=_(()=>i()("add_x",{values:{name:e.fieldLabel||c(h)}}));Bh(me,{get label(){return c(Ae)},get checked(){return c(O)},get disabled(){return c(R)},onChange:({detail:{checked:Ce}})=>{Ce?J():Q()}})}};U(te,me=>{!c(B)&&!f()&&me(de)})}var he=z(te,2);{var ue=me=>{dw(me,{get disabled(){return c(R)},get fieldConfig(){return e.fieldConfig},addItem:J})};U(he,me=>{c(B)&&!c(O)&&me(ue)})}var ge=z(he,2);{var ye=me=>{var Ae=Dne(),Ce=F(Ae);{var _e=Re=>{{const Ie=Ee=>{var qe=X(),Ke=M(qe);{var lt=Te=>{{const Me=Le=>{Qe(Le,{name:"close"})};let pe=_(()=>i()("remove"));et(Te,{size:"small",iconic:!0,get disabled(){return c(R)},get"aria-label"(){return c(pe)},onclick:()=>{Q()},startIcon:Me,$$slots:{startIcon:!0}})}};U(Ke,Te=>{c(B)&&Te(lt)})}S(Ee,qe)};let Pe=_(()=>c(B)?c(G)?.label||c(G)?.name:""),$e=_(()=>c(W).length?()=>na({[c(L)]:!c(D)}):void 0);P1(Re,{get label(){return c(Pe)},get controlId(){return`object-${n}-item-list`},get expanded(){return c(D)},get toggleExpanded(){return c($e)},endContent:Ie,$$slots:{endContent:!0}})}};U(Ce,Re=>{d||Re(_e)})}var fe=z(Ce,2),be=F(fe);{var Oe=Re=>{var Ie=X(),Pe=M(Ie);rt(Pe,17,()=>c(W),$e=>$e.name,($e,Ee)=>{const qe=_(()=>`${e.keyPath}.${c(Ee).name}`);yo($e,{children:(Ke,lt)=>{{let Te=_(()=>c(B)&&c(G)?.name?`${e.keyPath}<${c(G).name}>.${c(Ee).name}`:c(qe));kv(Ke,{get keyPath(){return c(qe)},get typedKeyPath(){return c(Te)},get locale(){return e.locale},get fieldConfig(){return c(Ee)}})}},$$slots:{default:!0}})}),S(Re,Ie)},je=Re=>{const Ie=_(ee);var Pe=X(),$e=M(Pe);{var Ee=qe=>{var Ke=Mne(),lt=F(Ke);{let Te=_(()=>o()?2:1);Ur(lt,{get lines(){return c(Te)},children:(Me,pe)=>{var Le=Fe();Z(()=>ne(Le,c(Ie))),S(Me,Le)},$$slots:{default:!0}})}Z(()=>Se(Ke,"id",`object-${n}-summary`)),S(qe,Ke)};U($e,qe=>{c(Ie)&&qe(Ee)})}S(Re,Pe)};U(be,Re=>{c(D)?Re(Oe):Re(je,!1)})}Z(()=>{Se(Ae,"aria-labelledby",c(D)?void 0:`object-${n}-summary`),Se(fe,"id",`object-${n}-item-list`)}),S(me,Ae)};U(ge,me=>{(!(!f()||c(B))||c(O))&&c(I)&&me(ye)})}S(t,re),se(),s()}function Une(t,e){ae(e,!0);const n=()=>H(Xe,"$entryDraft",r),[r,i]=ve(),o=_(()=>e.fieldConfig.fields),a=_(()=>e.fieldConfig.types),s=_(()=>at(e.fieldConfig.typeKey,"type")),l=_(()=>Kn(n()?.currentValues[e.locale])??{}),u=_(()=>Object.entries(c(l)).some(([y,w])=>!!y.startsWith(`${e.keyPath}.`)&&!!w)),d=_(()=>Array.isArray(c(a))),f=_(()=>`${e.keyPath}.${c(s)}`),h=_(()=>c(d)?c(a)?.find(({name:y})=>y===c(l)[c(f)]):void 0),p=_(()=>c(h)?c(h).label||c(h).name:void 0),g=_(()=>(c(d)?c(h)?.fields:c(o))??[]);var m=X(),v=M(m);{var b=y=>{VR(y,{get label(){return c(p)},children:(w,x)=>{var E=X(),$=M(E);rt($,17,()=>c(g),A=>A.name,(A,k)=>{const T=_(()=>`${e.keyPath}.${c(k).name}`);yo(A,{children:(C,P)=>{{let O=_(()=>c(d)&&c(h)?.name?`${e.keyPath}<${c(h).name}>.${c(k).name}`:c(T));O1(C,{get keyPath(){return c(T)},get typedKeyPath(){return c(O)},get locale(){return e.locale},get fieldConfig(){return c(k)}})}},$$slots:{default:!0}})}),S(w,E)}})};U(v,y=>{c(u)&&y(b)})}S(t,m),se(),i()}function Bne(t,e){ae(e,!0);const n=()=>H(Xe,"$entryDraft",r),[r,i]=ve(),{valueStoreKey:o="currentValues"}=pr("field-editor")??{};let a=N(e,"required",3,!0),s=N(e,"readonly",3,!1),l=N(e,"invalid",3,!1);const u=_(()=>e.fieldConfig.i18n),d=_(()=>e.fieldConfig.max),f=_(()=>at(e.fieldConfig.dropdown_threshold,5)),h=w=>{n()&&Object.keys(Kn(n()[o])??{}).forEach(x=>{c(u)!=="duplicate"&&x!==e.locale||qR({locale:x,valueStoreKey:o,keyPath:e.keyPath,manipulate:w})})},p=w=>{h(({valueList:x})=>{x.push(w)})},g=w=>{h(({valueList:x})=>{x.splice(x.indexOf(w),1)})};var m=X(),v=M(m);{var b=w=>{x9(w,Qt({get disabled(){return s()},get readonly(){return s()},get required(){return a()},get invalid(){return l()},get options(){return e.options}},()=>({values:e.currentValue}),{get max(){return c(d)},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},onAddValue:({detail:{value:x}})=>{p(x)},onRemoveValue:({detail:{value:x}})=>{g(x)}}))},y=w=>{hH(w,{get"aria-labelledby"(){return`${e.fieldId??""}-label`},children:(x,E)=>{var $=X(),A=M($);rt(A,17,()=>e.options,({label:k,value:T})=>T,(k,T)=>{let C=()=>c(T).label,P=()=>c(T).value;{let O=_(()=>e.currentValue?.includes(P())??!1);Bh(k,{get label(){return C()},get value(){return P()},get readonly(){return s()},get required(){return a()},get invalid(){return l()},get checked(){return c(O)},get"aria-errormessage"(){return`${e.fieldId??""}-error`},onChange:({detail:{checked:I}})=>{I?p(P()):g(P())}})}}),S(x,$)},$$slots:{default:!0}})};U(v,w=>{e.options.length>c(f)?w(b):w(y,!1)})}S(t,m),se(),i()}function qne(t,e){ae(e,!0);const n=()=>H(ce,"$_",r),[r,i]=ve();let o=N(e,"currentValue",15),a=N(e,"required",3,!0),s=N(e,"readonly",3,!1),l=N(e,"invalid",3,!1),u=N(e,"options",7);const d=_(()=>at(e.fieldConfig.dropdown_threshold,5));let f=ie(void 0);ze(()=>{c(f)||V(f,u()[0]?.value!==void 0?typeof u()[0]?.value:"string",!0)}),ze(()=>{!a()&&!u().some(({value:v})=>!v)&&u([{label:n()("unselected_option"),value:c(f)==="number"?null:"",searchValue:""},...u()])});var h=X(),p=M(h);{var g=v=>{bc(v,{get readonly(){return s()},get required(){return a()},get invalid(){return l()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return o()},set value(b){o(b)},children:(b,y)=>{var w=X(),x=M(w);rt(x,17,u,({label:E,value:$,searchValue:A})=>$,(E,$)=>{let A=()=>c($).label,k=()=>c($).value,T=()=>c($).searchValue;{let C=_(()=>k()===o());Mr(E,{get label(){return A()},get value(){return k()},get valueType(){return c(f)},get searchValue(){return T()},get selected(){return c(C)},wrap:!0})}}),S(b,w)},$$slots:{default:!0}})},m=v=>{r9(v,{get readonly(){return s()},get required(){return a()},get invalid(){return l()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},onChange:({detail:{value:b}})=>{o(b)},children:(b,y)=>{var w=X(),x=M(w);rt(x,17,u,({label:E,value:$})=>$,(E,$)=>{let A=()=>c($).label,k=()=>c($).value;{let T=_(()=>k()===o());s9(E,{get label(){return A()},get value(){return k()},get valueType(){return c(f)},get checked(){return c(T)}})}}),S(b,w)},$$slots:{default:!0}})};U(p,v=>{u().length>c(d)?v(g):v(m,!1)})}S(t,h),se(),i()}function YR(t,e){ae(e,!0);let n=N(e,"currentValue",15),r=N(e,"required",3,!0),i=N(e,"readonly",3,!1),o=N(e,"invalid",3,!1),a=N(e,"sortOptions",3,!1);const s=_(()=>e.fieldConfig.options),l=_(()=>e.fieldConfig.multiple),u=_(()=>c(l)?Bne:qne),d=_(()=>{const p=c(s).map(g=>$t(g)?g:{label:g,value:g});return a()&&p.sort((g,m)=>eo(g.label,m.label)),p});var f=X(),h=M(f);fr(h,()=>JSON.stringify(c(d)),p=>{var g=X(),m=M(g);br(m,()=>c(u),(v,b)=>{b(v,{get locale(){return e.locale},get keyPath(){return e.keyPath},get fieldId(){return e.fieldId},get fieldConfig(){return e.fieldConfig},get readonly(){return i()},get required(){return r()},get invalid(){return o()},get options(){return c(d)},get currentValue(){return n()},set currentValue(y){n(y)}})}),S(p,g)}),S(t,f),se()}var Hne=j('<div role="none" class="wrapper"><!></div>');function Kne(t,e){ae(e,!0);let n=N(e,"currentValue",15),r=N(e,"required",3,!0),i=N(e,"readonly",3,!1),o=N(e,"invalid",3,!1);const a=_(()=>e.fieldConfig.collection),s=_(()=>e.fieldConfig.file),l=_(()=>c(s)?[f0(c(a),c(s))].filter(h=>!!h):Sa(c(a))),u=_(()=>({...e.fieldConfig,widget:"select",options:Xx(e.locale,e.fieldConfig,c(l))}));var d=Hne(),f=F(d);YR(f,{get locale(){return e.locale},get keyPath(){return e.keyPath},get typedKeyPath(){return e.typedKeyPath},get fieldId(){return e.fieldId},get fieldLabel(){return e.fieldLabel},get fieldConfig(){return c(u)},get readonly(){return i()},get required(){return r()},get invalid(){return o()},sortOptions:!0,get currentValue(){return n()},set currentValue(h){n(h)}}),S(t,d),se()}var Vne=j('<p dir="auto"> </p>');function Gne(t,e){ae(e,!0);const n=_(()=>e.fieldConfig.collection),r=_(()=>e.fieldConfig.file),i=_(()=>at(e.fieldConfig.multiple,!1)),o=_(()=>at(e.fieldConfig.value_field,"{{slug}}")),a=_(()=>Hl(e.locale)),s=_(()=>c(r)?[f0(c(n),c(r))].filter(p=>!!p):Sa(c(n))),l=_(()=>Xx(e.locale,e.fieldConfig,c(s))),u=_(()=>(c(i)?e.currentValue:[e.currentValue]).filter(p=>p!==void 0).map(p=>{const g=c(l).find(m=>m.value===p)?.label;return g&&g!==p?["slug","{{slug}}","{{fields.slug}}"].includes(c(o))?g:`${g} (${p})`:p}));var d=X(),f=M(d);{var h=p=>{var g=Vne(),m=F(g);Z((v,b)=>{Se(g,"lang",v),ne(m,b),g.dir=g.dir},[()=>jr(e.locale),()=>c(a).format(c(u))]),S(p,g)};U(f,p=>{c(u).length&&p(h)})}S(t,d),se()}var Wne=j('<p dir="auto"> </p>'),Yne=j('<p dir="auto"> </p>');function Jne(t,e){ae(e,!0);const n=_(()=>e.fieldConfig.options),r=_(()=>e.fieldConfig.multiple),i=_(()=>AP(c(n))),o=_(()=>Hl(e.locale)),a=f=>c(i)&&c(n).find(h=>h.value===f)?.label||String(f);var s=X(),l=M(s);{var u=f=>{var h=Wne(),p=F(h);Z((g,m)=>{Se(h,"lang",g),ne(p,m),h.dir=h.dir},[()=>jr(e.locale),()=>c(o).format(e.currentValue.map(a).sort())]),S(f,h)},d=f=>{var h=X(),p=M(h);{var g=m=>{var v=Yne(),b=F(v);Z((y,w)=>{Se(v,"lang",y),ne(b,w),v.dir=v.dir},[()=>jr(e.locale),()=>a(e.currentValue)]),S(m,v)};U(p,m=>{e.currentValue!==void 0&&m(g)},!0)}S(f,h)};U(l,f=>{c(r)&&Array.isArray(e.currentValue)&&e.currentValue.length?f(u):f(d,!1)})}S(t,s),se()}const JR=({fieldConfig:t,value:e})=>{const{minlength:n,maxlength:r}=t,i=Number.isInteger(n)&&n<=(r??1/0),o=Number.isInteger(r)&&(n??0)<=r,a=e?[...e.trim()].length:0,s=i&&a<n,l=o&&a>r;return{count:a,hasMin:i,hasMax:o,tooShort:s,tooLong:l,invalid:s||l}};var Xne=j('<div class="wrapper svelte-18cyzaa"><!> <span role="none"> </span> <!></div>');const Zne={hash:"svelte-18cyzaa",code:".wrapper.svelte-18cyzaa {flex:none;color:var(--sui-tertiary-foreground-color) !important;font-size:var(--sui-font-size-small);line-height:var(--sui-line-height-compact);text-align:end;}.count.invalid.svelte-18cyzaa {color:var(--sui-error-foreground-color);}.count.svelte-18cyzaa:not(.invalid) {color:var(--sui-success-foreground-color);}"};function XR(t,e){ae(e,!0),ke(t,Zne);const n=()=>H(ce,"$_",r),[r,i]=ve(),o=_(()=>e.fieldConfig.minlength),a=_(()=>e.fieldConfig.maxlength),s=_(()=>JR({fieldConfig:e.fieldConfig,value:e.currentValue})),l=_(()=>c(s).count),u=_(()=>c(s).hasMin),d=_(()=>c(s).hasMax),f=_(()=>c(s).invalid);var h=X(),p=M(h);{var g=m=>{var v=Xne(),b=F(v);{var y=k=>{var T=Fe();Z(()=>ne(T,`${c(o)??""}
|
|
664
|
+
}`};function Tne(t,e){ae(e,!0),ke(t,Ene);const n=()=>H(Xe,"$entryDraft",r),[r,i]=ve(),{widgetContext:o=void 0}=pr("field-editor")??{},a=o==="markdown-editor-component";let s=N(e,"currentValue",15),l=N(e,"required",3,!0),u=N(e,"readonly",3,!1),d=N(e,"invalid",3,!1),f=ie(void 0),h=ie(""),p=0;const g=_(()=>at(e.fieldConfig.modes,()=>[...fne],!0)),m=_(()=>at(e.fieldConfig.buttons,()=>[...pne],!0)),v=_(()=>at(e.fieldConfig.editor_components,()=>[...mne,...xg.keys()],!0)),b=_(()=>at(e.fieldConfig.linked_images,!0)),y=_(()=>at(e.fieldConfig.minimal,!1)),w=_(()=>c(g).map(D=>hne[D]).filter(Boolean)),x=_(()=>[...c(m),...c(v).includes("code-block")?["code-block"]:[]].map(D=>gne[D]).filter(Boolean)),E=_(()=>a?[]:c(v).map(D=>ZP(D==="image"&&c(b)?"linked-image":D)).filter(D=>!!D).map(D=>new kne(D))),$=_(()=>c(E).find(({id:D})=>D==="image"||D==="linked-image")),A=({target:D,images:B})=>{const K=D?.closest("div"),G=av(K);!c($)||!K?.matches(".lexical-root")||!G||B.forEach(({file:W,src:Y,alt:R=""})=>{W&&(Y=URL.createObjectURL(W));const q=()=>{if(!W||!Y)return;const J=new MutationObserver(Q=>{Q.forEach(({addedNodes:ee})=>{ee.forEach(re=>{re instanceof HTMLElement&&re.matches(".preview")&&re.querySelector(`img[src="${Y}"]`)&&(re.closest(".drop-target")?.dispatchEvent(new CustomEvent("Select",{detail:{files:[W]}})),Y?.startsWith("blob:")&&URL.revokeObjectURL(Y),J.disconnect())})})});J.observe(K,{childList:!0,subtree:!0})};G.update(()=>{yd([c($).createNode({src:Y,alt:R}),Tn()])},{onUpdate:q})})},k=async D=>{const{target:B,clipboardData:K}=D,G=K?.items;if(!G)return;let W=[];const Y=[...G].findIndex(({kind:q,type:J})=>q==="file"&&sa.includes(J)),R=[...G].findIndex(({kind:q,type:J})=>q==="string"&&J==="text/html");if(Y>-1&&R>-1){const q=Y>-1?G[Y].getAsFile():void 0;if(!q)return;G.clear(),D.stopPropagation();let J="",Q=q.name;const ee=await new Promise(re=>{G[R].getAsString(te=>{re(new DOMParser().parseFromString(te,"text/html").querySelector("img"))})});if(ee&&(J=ee.alt,/^https?:/.test(ee.src))){const re=new URL(ee.src).pathname.split("/").pop()??"";(ey.test(re)||RU.test(re))&&(Q=re)}W=[{file:new File([q],Q,{type:q.type}),alt:J}]}else W=[...K.files].filter(({type:q})=>sa.includes(q)).map(q=>({file:q}));W.length&&(W=W.map(({file:q,alt:J},Q)=>{if(q?.name==="image.png"){const{year:ee,month:re,day:te,hour:de,minute:he,second:ue}=jl(),ge=W.length>1?`-${Q+1}`:"",ye=`${ee}${re}${te}-${de}${he}${ue}${ge}.png`;q=new File([q],ye,{type:q.type})}return{file:q,alt:J}}),A({target:B,images:W}))},T=async D=>{const{target:B,dataTransfer:K}=D,G=K?.files;let W=[];if(G?.length)W=[...G].filter(({type:Y})=>sa.includes(Y)).map(Y=>({file:Y}));else{const Y=D.dataTransfer?.getData("text/html");if(Y){const R=new DOMParser().parseFromString(Y,"text/html").querySelector("img");if(R){const{src:q,alt:J}=R,Q=q.match(/^data:(?<type>image\/.+?);base64,.+/);let ee;if(Q){const re=Q.groups?.type??"";if(sa.includes(re))try{const te=await(await fetch(q)).blob(),{year:de,month:he,day:ue,hour:ge,minute:ye,second:me}=jl(),Ae=re.split("/")[1],Ce=`${de}${he}${ue}-${ge}${ye}${me}.${Ae}`;ee=new File([te],Ce,{type:re})}catch{return}}W=[{file:ee,src:q,alt:J}]}}}W.length&&A({target:B,images:W})},C=()=>{const D=typeof s()=="string"?s():"";c(h)!==D&&V(h,D,!0),!(!n()||a)&&(window.clearTimeout(p),p=window.setTimeout(()=>{Object.keys(n()?.extraValues[e.locale]??{}).forEach(B=>{const[K]=B.match(hh)??[];K?.startsWith(`${e.keyPath}:`)&&!c(f)?.querySelector(`[data-key-path-prefix="${K}"]`)&&delete n().extraValues[e.locale][B]})},500))},P=()=>{const D=c(h);s()!==D&&s(D)};ze(()=>{s(),xe(()=>{C()})}),ze(()=>{c(h),xe(()=>{P()})});var O=Sne();let I;var L=F(O);En(L,Rt,null,D=>{var B=X(),K=M(B);fr(K,()=>JSON.stringify(e.fieldConfig),G=>{{let W=_(()=>jr(e.locale));_W(G,{get lang(){return c(W)},get modes(){return c(w)},get buttons(){return c(x)},get components(){return c(E)},flex:!0,get readonly(){return u()},get required(){return l()},get invalid(){return d()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},autoResize:!0,onpastecapture:Y=>{k(Y)},ondrop:Y=>{T(Y)},get value(){return c(h)},set value(Y){V(h,Y,!0)}})}}),S(D,B)}),St(O,D=>V(f,D),()=>c(f)),Z(()=>I=hn(O,1,"wrapper svelte-eev3hl",null,I,{minimal:c(y)})),S(t,O),se(),i()}function $ne(){return{useNewRenderer:!0,renderer:{heading(...t){return Ut.Renderer.prototype.heading.call(this,...t).replace(/^<(h\d)/,'<$1 dir="auto"')},list(...t){return Ut.Renderer.prototype.list.call(this,...t).replace(/^<(ol|ul)/,'<$1 dir="auto"')},paragraph(...t){return Ut.Renderer.prototype.paragraph.call(this,...t).replace(/^<p/,'<p dir="auto"')}}}}const Ane=(...t)=>{const{alt:e,src:n,title:r}=t.at(-1),i=n.replaceAll(" ","%20");return r?``:``};var Cne=j('<div role="none" class="svelte-lijj98"><!></div>');const Pne={hash:"svelte-lijj98",code:"[role='document'] div.svelte-lijj98 :is(h1, h2, h3, h4, h5, h6, p, ul, ol) {margin:1em 0 0;}[role='document'] div.svelte-lijj98 :is(video, img) {max-width:100%;max-height:100%;}[role='document'] div.svelte-lijj98 :is(a:has(img)) {display:inline-block;}[role='document'] div.svelte-lijj98 :is(a:has(img)) img {pointer-events:none;}"};function One(t,e){ae(e,!0),ke(t,Pne);const n=()=>H(Xe,"$entryDraft",r),[r,i]=ve();let o=ie("");const a=_(()=>n()?.originalEntry),s=_(()=>n()?.collectionName??""),l=_(()=>n()?.fileName),u=_(()=>at(e.fieldConfig.sanitize_preview,!0)),d=_(()=>(e.currentValue??"").replace(oB,Ane)),f={breaks:!0,async:!0,walkTokens:async v=>{if(v.type==="image"){const b=await ql({value:v.href,entry:c(a),collectionName:c(s),fileName:c(l)});b&&(v.href=b)}}},h={ALLOWED_URI_REGEXP:/^(?:(?:(?:f|ht)tps?|mailto|tel|blob):|[^a-z]|[a-z+.-]+(?:[^a-z+.\-:]|$))/i};GB($ne()),ze(()=>{(async()=>V(o,await Yx(c(d),f),!0))()});var p=Cne(),g=F(p);{var m=v=>{var b=X(),y=M(b);_r(y,()=>c(u)?Qr.sanitize(c(o),h):c(o)),S(v,b)};U(g,v=>{typeof e.currentValue=="string"&&e.currentValue.trim()&&v(m)})}S(t,p),se(),i()}function Lne(t,e){ae(e,!0);let n=N(e,"currentValue",15),r=N(e,"required",3,!0),i=N(e,"readonly",3,!1),o=N(e,"invalid",3,!1),a=ie(void 0),s=ie("");const l=_(()=>at(e.fieldConfig.value_type,"int")),u=_(()=>e.fieldConfig.min),d=_(()=>e.fieldConfig.max),f=_(()=>at(e.fieldConfig.step,1)),h=_(()=>c(l)==="int"||c(l)==="float"),p=()=>{if(n()!==void 0){if(c(h)&&c(a)!==n())if(typeof n()=="number")V(a,n(),!0);else if(typeof n()=="string"){const w=n().trim()?Number(n()):NaN;V(a,Number.isNaN(w)?void 0:w,!0)}else V(a,void 0);!c(h)&&c(s)!==n()&&V(s,String(n()),!0)}},g=()=>{let w;c(h)?c(a)===void 0?w=NaN:c(l)==="int"?w=Number.parseInt(c(h)?String(c(a)):c(s),10):w=Number.parseFloat(c(h)?String(c(a)):c(s)):w=c(s),c(h)&&Number.isNaN(w)&&(w=null),n()!==w&&n(w)};ze(()=>{n(),xe(()=>{p()})}),ze(()=>{c(s),xe(()=>{g()})}),ze(()=>{c(a),xe(()=>{g()})});var m=X(),v=M(m);{var b=w=>{wW(w,{get min(){return c(u)},get max(){return c(d)},get step(){return c(f)},get readonly(){return i()},get required(){return r()},get invalid(){return o()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return c(a)},set value(x){V(a,x,!0)}})},y=w=>{Yn(w,{get readonly(){return i()},get required(){return r()},get invalid(){return o()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return c(s)},set value(x){V(s,x,!0)}})};U(v,w=>{c(h)?w(b):w(y,!1)})}S(t,m),se()}var Ine=j('<p dir="auto"><!></p>');function Nne(t,e){ae(e,!0);const n=_(()=>at(e.fieldConfig.value_type,"int")),r=_(()=>jr(e.locale)),i=_(()=>Intl.NumberFormat(c(r)));var o=X(),a=M(o);{var s=l=>{var u=Ine(),d=F(u);{var f=p=>{var g=Fe();Z(m=>ne(g,m),[()=>c(i).format(Number(e.currentValue))]),S(p,g)},h=p=>{var g=Fe();Z(()=>ne(g,e.currentValue)),S(p,g)};U(d,p=>{c(n)==="int"||c(n)==="float"?p(f):p(h,!1)})}Z(()=>{Se(u,"lang",c(r)),u.dir=u.dir}),S(l,u)};U(a,l=>{e.currentValue!==void 0&&e.currentValue!==null&&e.currentValue!==""&&l(s)})}S(t,o),se()}const GR=t=>{const{collectionName:e,fileName:n,collection:r,collectionFile:i,currentValues:o,isIndexFile:a}=oe(Xe),{defaultLocale:s}=(i??r)._i18n,l={...Rs(t),...Rs(o[s])},u={collectionName:e,fileName:n,valueMap:l,isIndexFile:a},d=[];return Object.keys(l).forEach(f=>{const h=gn({...u,keyPath:f});if(!h)return;const{widget:p="text",i18n:g=!1}=h;["text","string","markdown"].includes(p)&&[!0,"translate"].includes(g)&&(l[f]=t[f]??""),([!1,"none"].includes(g)||d.some(m=>new RegExp(`^${Xt(m)}\\b`).test(f)))&&(delete l[f],d.push(f))}),l},WR=t=>{Xe.update(e=>{const{fields:n,defaultLocale:r,currentLocales:i,currentValues:o,validities:a}=e,s=!i[t];if(s&&!o[t]){const{collectionName:l,fileName:u,originalValues:d}=e,f=ip({fields:n,locale:t,defaultLocale:r});return{...e,currentLocales:{...i,[t]:s},originalValues:{...d,[t]:f},currentValues:{...o,[t]:b1({draft:{collectionName:l,fileName:u},locale:t,target:GR(f)})}}}return{...e,currentLocales:{...i,[t]:s},validities:{...a,[t]:{}}}})},Rne=({collectionName:t,fileName:e,keyPath:n,valueMap:r,isIndexFile:i=!1,locale:o,summaryTemplate:a})=>{const s={collectionName:t,fileName:e,keyPath:"",valueMap:r,isIndexFile:i};return a?a.replaceAll(/{{(.+?)}}/g,(l,u)=>{const[d,...f]=u.split(/\s*\|\s*/);return dd({...s,keyPath:`${n}.${d.replace(/^fields\./,"")}`,locale:o,transformations:f})}):pO({valueMap:r,locale:o,keyPath:n,keyPathRegex:new RegExp(`^${Xt(n)}\\.`),getFieldArgs:s})};var Mne=j('<div role="none" class="summary svelte-ztn6n1"><!></div>'),Dne=j('<div role="group" class="wrapper svelte-ztn6n1"><!> <div role="none" class="item-list"><!></div></div>'),Fne=j("<!> <!> <!>",1);const zne={hash:"svelte-ztn6n1",code:".wrapper.svelte-ztn6n1 {border-width:2px;border-color:var(--sui-secondary-border-color);border-radius:var(--sui-control-medium-border-radius);}.sui.checkbox + .wrapper.svelte-ztn6n1 > .group {margin-top:8px;}.summary.svelte-ztn6n1 {padding:8px;}"};function jne(t,e){const n=Jn();ae(e,!0),ke(t,zne);const r=()=>H(Xe,"$entryDraft",a),i=()=>H(ce,"$_",a),o=()=>H(mn,"$isSmallScreen",a),[a,s]=ve(),{widgetContext:l,valueStoreKey:u="currentValues"}=pr("field-editor")??{},d=l==="single-subfield-list-widget";let f=N(e,"required",3,!0);const h=_(()=>e.fieldConfig.name),p=_(()=>at(e.fieldConfig.i18n,!1)),g=_(()=>e.fieldConfig.collapsed),m=_(()=>e.fieldConfig.summary),v=_(()=>e.fieldConfig.fields),b=_(()=>e.fieldConfig.types),y=_(()=>at(e.fieldConfig.typeKey,"type")),w=_(()=>r()?.isIndexFile??!1),x=_(()=>r()?.collection),E=_(()=>r()?.collectionName??""),$=_(()=>r()?.collectionFile),A=_(()=>r()?.fileName),k=_(()=>(c($)??c(x))?._i18n??Go),T=_(()=>c(k).defaultLocale),C=_(()=>Kn(r()?.[u][e.locale])??{}),P=_(()=>({collectionName:c(E),fileName:c(A),valueMap:c(C),isIndexFile:c(w)})),O=_(()=>Object.entries(c(C)).some(([me,Ae])=>!!me.startsWith(`${e.keyPath}.`)&&(Ae!==null||gn({...c(P),keyPath:me})?.widget==="object"))),I=_(()=>l==="markdown-editor-component"||e.locale===c(T)||c(p)!==!1),L=_(()=>`${e.keyPath}#`),D=_(()=>r()?.expanderStates?._[c(L)]??!0),B=_(()=>Array.isArray(c(b))),K=_(()=>`${e.keyPath}.${c(y)}`),G=_(()=>c(B)?c(b)?.find(({name:me})=>me===c(C)[c(K)]):void 0),W=_(()=>(c(B)?c(G)?.fields:c(v))??[]),Y=_(()=>c(B)&&c(G)?.summary||c(m)),R=_(()=>e.locale!==c(T)&&c(p)==="duplicate"),q=()=>{if(d)return;const me=c(L);na({[me]:HR({key:me,locale:e.locale,collapsed:c(g)})})},J=async({type:me}={})=>{Je(No,!1),me&&(Object.keys(r()?.[u]??{}).forEach(_e=>{(_e===e.locale||c(p)==="duplicate")&&bt(Xe,xe(r)[u][_e][c(K)]=me,xe(r))}),await El());const Ae=Object.fromEntries(Object.entries(ip({fields:c(W),locale:e.locale,defaultLocale:c(T)})).map(([_e,fe])=>[`${e.keyPath}.${_e}`,fe])),Ce=e.locale===c(T)?Ae:GR(Ae);Object.entries(r()?.[u]??{}).forEach(([_e,fe])=>{(_e===e.locale||c(p)==="duplicate")&&(bt(Xe,xe(r)[u][_e]=Object.assign(fe,Rs({...Ce,...fe})),xe(r)),delete r()[u][_e][e.keyPath])}),Je(No,!0)},Q=()=>{Je(No,!1),Object.entries(r()?.[u]??{}).forEach(([me,Ae])=>{(me===e.locale||c(p)==="duplicate")&&(Object.keys(Ae).forEach(Ce=>{Ce.startsWith(`${e.keyPath}.`)&&(bt(Xe,xe(r)[u][me][Ce]=null,xe(r)),delete r()?.[u][me][Ce])}),bt(Xe,xe(r)[u][me][e.keyPath]=null,xe(r)))}),Je(No,!0)},ee=()=>Rne({...c(P),keyPath:e.keyPath,locale:e.locale,summaryTemplate:c(Y)});Vt(()=>{q()});var re=Fne(),te=M(re);{var de=me=>{{let Ae=_(()=>i()("add_x",{values:{name:e.fieldLabel||c(h)}}));Bh(me,{get label(){return c(Ae)},get checked(){return c(O)},get disabled(){return c(R)},onChange:({detail:{checked:Ce}})=>{Ce?J():Q()}})}};U(te,me=>{!c(B)&&!f()&&me(de)})}var he=z(te,2);{var ue=me=>{dw(me,{get disabled(){return c(R)},get fieldConfig(){return e.fieldConfig},addItem:J})};U(he,me=>{c(B)&&!c(O)&&me(ue)})}var ge=z(he,2);{var ye=me=>{var Ae=Dne(),Ce=F(Ae);{var _e=Re=>{{const Ie=Ee=>{var qe=X(),Ke=M(qe);{var lt=Te=>{{const Me=Le=>{Qe(Le,{name:"close"})};let pe=_(()=>i()("remove"));et(Te,{size:"small",iconic:!0,get disabled(){return c(R)},get"aria-label"(){return c(pe)},onclick:()=>{Q()},startIcon:Me,$$slots:{startIcon:!0}})}};U(Ke,Te=>{c(B)&&Te(lt)})}S(Ee,qe)};let Pe=_(()=>c(B)?c(G)?.label||c(G)?.name:""),$e=_(()=>c(W).length?()=>na({[c(L)]:!c(D)}):void 0);P1(Re,{get label(){return c(Pe)},get controlId(){return`object-${n}-item-list`},get expanded(){return c(D)},get toggleExpanded(){return c($e)},endContent:Ie,$$slots:{endContent:!0}})}};U(Ce,Re=>{d||Re(_e)})}var fe=z(Ce,2),be=F(fe);{var Oe=Re=>{var Ie=X(),Pe=M(Ie);rt(Pe,17,()=>c(W),$e=>$e.name,($e,Ee)=>{const qe=_(()=>`${e.keyPath}.${c(Ee).name}`);yo($e,{children:(Ke,lt)=>{{let Te=_(()=>c(B)&&c(G)?.name?`${e.keyPath}<${c(G).name}>.${c(Ee).name}`:c(qe));kv(Ke,{get keyPath(){return c(qe)},get typedKeyPath(){return c(Te)},get locale(){return e.locale},get fieldConfig(){return c(Ee)}})}},$$slots:{default:!0}})}),S(Re,Ie)},je=Re=>{const Ie=_(ee);var Pe=X(),$e=M(Pe);{var Ee=qe=>{var Ke=Mne(),lt=F(Ke);{let Te=_(()=>o()?2:1);Ur(lt,{get lines(){return c(Te)},children:(Me,pe)=>{var Le=Fe();Z(()=>ne(Le,c(Ie))),S(Me,Le)},$$slots:{default:!0}})}Z(()=>Se(Ke,"id",`object-${n}-summary`)),S(qe,Ke)};U($e,qe=>{c(Ie)&&qe(Ee)})}S(Re,Pe)};U(be,Re=>{c(D)?Re(Oe):Re(je,!1)})}Z(()=>{Se(Ae,"aria-labelledby",c(D)?void 0:`object-${n}-summary`),Se(fe,"id",`object-${n}-item-list`)}),S(me,Ae)};U(ge,me=>{(!(!f()||c(B))||c(O))&&c(I)&&me(ye)})}S(t,re),se(),s()}function Une(t,e){ae(e,!0);const n=()=>H(Xe,"$entryDraft",r),[r,i]=ve(),o=_(()=>e.fieldConfig.fields),a=_(()=>e.fieldConfig.types),s=_(()=>at(e.fieldConfig.typeKey,"type")),l=_(()=>Kn(n()?.currentValues[e.locale])??{}),u=_(()=>Object.entries(c(l)).some(([y,w])=>!!y.startsWith(`${e.keyPath}.`)&&!!w)),d=_(()=>Array.isArray(c(a))),f=_(()=>`${e.keyPath}.${c(s)}`),h=_(()=>c(d)?c(a)?.find(({name:y})=>y===c(l)[c(f)]):void 0),p=_(()=>c(h)?c(h).label||c(h).name:void 0),g=_(()=>(c(d)?c(h)?.fields:c(o))??[]);var m=X(),v=M(m);{var b=y=>{VR(y,{get label(){return c(p)},children:(w,x)=>{var E=X(),$=M(E);rt($,17,()=>c(g),A=>A.name,(A,k)=>{const T=_(()=>`${e.keyPath}.${c(k).name}`);yo(A,{children:(C,P)=>{{let O=_(()=>c(d)&&c(h)?.name?`${e.keyPath}<${c(h).name}>.${c(k).name}`:c(T));O1(C,{get keyPath(){return c(T)},get typedKeyPath(){return c(O)},get locale(){return e.locale},get fieldConfig(){return c(k)}})}},$$slots:{default:!0}})}),S(w,E)}})};U(v,y=>{c(u)&&y(b)})}S(t,m),se(),i()}function Bne(t,e){ae(e,!0);const n=()=>H(Xe,"$entryDraft",r),[r,i]=ve(),{valueStoreKey:o="currentValues"}=pr("field-editor")??{};let a=N(e,"required",3,!0),s=N(e,"readonly",3,!1),l=N(e,"invalid",3,!1);const u=_(()=>e.fieldConfig.i18n),d=_(()=>e.fieldConfig.max),f=_(()=>at(e.fieldConfig.dropdown_threshold,5)),h=w=>{n()&&Object.keys(Kn(n()[o])??{}).forEach(x=>{c(u)!=="duplicate"&&x!==e.locale||qR({locale:x,valueStoreKey:o,keyPath:e.keyPath,manipulate:w})})},p=w=>{h(({valueList:x})=>{x.push(w)})},g=w=>{h(({valueList:x})=>{x.splice(x.indexOf(w),1)})};var m=X(),v=M(m);{var b=w=>{xK(w,Qt({get disabled(){return s()},get readonly(){return s()},get required(){return a()},get invalid(){return l()},get options(){return e.options}},()=>({values:e.currentValue}),{get max(){return c(d)},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},onAddValue:({detail:{value:x}})=>{p(x)},onRemoveValue:({detail:{value:x}})=>{g(x)}}))},y=w=>{hH(w,{get"aria-labelledby"(){return`${e.fieldId??""}-label`},children:(x,E)=>{var $=X(),A=M($);rt(A,17,()=>e.options,({label:k,value:T})=>T,(k,T)=>{let C=()=>c(T).label,P=()=>c(T).value;{let O=_(()=>e.currentValue?.includes(P())??!1);Bh(k,{get label(){return C()},get value(){return P()},get readonly(){return s()},get required(){return a()},get invalid(){return l()},get checked(){return c(O)},get"aria-errormessage"(){return`${e.fieldId??""}-error`},onChange:({detail:{checked:I}})=>{I?p(P()):g(P())}})}}),S(x,$)},$$slots:{default:!0}})};U(v,w=>{e.options.length>c(f)?w(b):w(y,!1)})}S(t,m),se(),i()}function qne(t,e){ae(e,!0);const n=()=>H(ce,"$_",r),[r,i]=ve();let o=N(e,"currentValue",15),a=N(e,"required",3,!0),s=N(e,"readonly",3,!1),l=N(e,"invalid",3,!1),u=N(e,"options",7);const d=_(()=>at(e.fieldConfig.dropdown_threshold,5));let f=ie(void 0);ze(()=>{c(f)||V(f,u()[0]?.value!==void 0?typeof u()[0]?.value:"string",!0)}),ze(()=>{!a()&&!u().some(({value:v})=>!v)&&u([{label:n()("unselected_option"),value:c(f)==="number"?null:"",searchValue:""},...u()])});var h=X(),p=M(h);{var g=v=>{bc(v,{get readonly(){return s()},get required(){return a()},get invalid(){return l()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return o()},set value(b){o(b)},children:(b,y)=>{var w=X(),x=M(w);rt(x,17,u,({label:E,value:$,searchValue:A})=>$,(E,$)=>{let A=()=>c($).label,k=()=>c($).value,T=()=>c($).searchValue;{let C=_(()=>k()===o());Mr(E,{get label(){return A()},get value(){return k()},get valueType(){return c(f)},get searchValue(){return T()},get selected(){return c(C)},wrap:!0})}}),S(b,w)},$$slots:{default:!0}})},m=v=>{rK(v,{get readonly(){return s()},get required(){return a()},get invalid(){return l()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},onChange:({detail:{value:b}})=>{o(b)},children:(b,y)=>{var w=X(),x=M(w);rt(x,17,u,({label:E,value:$})=>$,(E,$)=>{let A=()=>c($).label,k=()=>c($).value;{let T=_(()=>k()===o());sK(E,{get label(){return A()},get value(){return k()},get valueType(){return c(f)},get checked(){return c(T)}})}}),S(b,w)},$$slots:{default:!0}})};U(p,v=>{u().length>c(d)?v(g):v(m,!1)})}S(t,h),se(),i()}function YR(t,e){ae(e,!0);let n=N(e,"currentValue",15),r=N(e,"required",3,!0),i=N(e,"readonly",3,!1),o=N(e,"invalid",3,!1),a=N(e,"sortOptions",3,!1);const s=_(()=>e.fieldConfig.options),l=_(()=>e.fieldConfig.multiple),u=_(()=>c(l)?Bne:qne),d=_(()=>{const p=c(s).map(g=>$t(g)?g:{label:g,value:g});return a()&&p.sort((g,m)=>eo(g.label,m.label)),p});var f=X(),h=M(f);fr(h,()=>JSON.stringify(c(d)),p=>{var g=X(),m=M(g);br(m,()=>c(u),(v,b)=>{b(v,{get locale(){return e.locale},get keyPath(){return e.keyPath},get fieldId(){return e.fieldId},get fieldConfig(){return e.fieldConfig},get readonly(){return i()},get required(){return r()},get invalid(){return o()},get options(){return c(d)},get currentValue(){return n()},set currentValue(y){n(y)}})}),S(p,g)}),S(t,f),se()}var Hne=j('<div role="none" class="wrapper"><!></div>');function Kne(t,e){ae(e,!0);let n=N(e,"currentValue",15),r=N(e,"required",3,!0),i=N(e,"readonly",3,!1),o=N(e,"invalid",3,!1);const a=_(()=>e.fieldConfig.collection),s=_(()=>e.fieldConfig.file),l=_(()=>c(s)?[f0(c(a),c(s))].filter(h=>!!h):Sa(c(a))),u=_(()=>({...e.fieldConfig,widget:"select",options:Xx(e.locale,e.fieldConfig,c(l))}));var d=Hne(),f=F(d);YR(f,{get locale(){return e.locale},get keyPath(){return e.keyPath},get typedKeyPath(){return e.typedKeyPath},get fieldId(){return e.fieldId},get fieldLabel(){return e.fieldLabel},get fieldConfig(){return c(u)},get readonly(){return i()},get required(){return r()},get invalid(){return o()},sortOptions:!0,get currentValue(){return n()},set currentValue(h){n(h)}}),S(t,d),se()}var Vne=j('<p dir="auto"> </p>');function Gne(t,e){ae(e,!0);const n=_(()=>e.fieldConfig.collection),r=_(()=>e.fieldConfig.file),i=_(()=>at(e.fieldConfig.multiple,!1)),o=_(()=>at(e.fieldConfig.value_field,"{{slug}}")),a=_(()=>Hl(e.locale)),s=_(()=>c(r)?[f0(c(n),c(r))].filter(p=>!!p):Sa(c(n))),l=_(()=>Xx(e.locale,e.fieldConfig,c(s))),u=_(()=>(c(i)?e.currentValue:[e.currentValue]).filter(p=>p!==void 0).map(p=>{const g=c(l).find(m=>m.value===p)?.label;return g&&g!==p?["slug","{{slug}}","{{fields.slug}}"].includes(c(o))?g:`${g} (${p})`:p}));var d=X(),f=M(d);{var h=p=>{var g=Vne(),m=F(g);Z((v,b)=>{Se(g,"lang",v),ne(m,b),g.dir=g.dir},[()=>jr(e.locale),()=>c(a).format(c(u))]),S(p,g)};U(f,p=>{c(u).length&&p(h)})}S(t,d),se()}var Wne=j('<p dir="auto"> </p>'),Yne=j('<p dir="auto"> </p>');function Jne(t,e){ae(e,!0);const n=_(()=>e.fieldConfig.options),r=_(()=>e.fieldConfig.multiple),i=_(()=>AP(c(n))),o=_(()=>Hl(e.locale)),a=f=>c(i)&&c(n).find(h=>h.value===f)?.label||String(f);var s=X(),l=M(s);{var u=f=>{var h=Wne(),p=F(h);Z((g,m)=>{Se(h,"lang",g),ne(p,m),h.dir=h.dir},[()=>jr(e.locale),()=>c(o).format(e.currentValue.map(a).sort())]),S(f,h)},d=f=>{var h=X(),p=M(h);{var g=m=>{var v=Yne(),b=F(v);Z((y,w)=>{Se(v,"lang",y),ne(b,w),v.dir=v.dir},[()=>jr(e.locale),()=>a(e.currentValue)]),S(m,v)};U(p,m=>{e.currentValue!==void 0&&m(g)},!0)}S(f,h)};U(l,f=>{c(r)&&Array.isArray(e.currentValue)&&e.currentValue.length?f(u):f(d,!1)})}S(t,s),se()}const JR=({fieldConfig:t,value:e})=>{const{minlength:n,maxlength:r}=t,i=Number.isInteger(n)&&n<=(r??1/0),o=Number.isInteger(r)&&(n??0)<=r,a=e?[...e.trim()].length:0,s=i&&a<n,l=o&&a>r;return{count:a,hasMin:i,hasMax:o,tooShort:s,tooLong:l,invalid:s||l}};var Xne=j('<div class="wrapper svelte-18cyzaa"><!> <span role="none"> </span> <!></div>');const Zne={hash:"svelte-18cyzaa",code:".wrapper.svelte-18cyzaa {flex:none;color:var(--sui-tertiary-foreground-color) !important;font-size:var(--sui-font-size-small);line-height:var(--sui-line-height-compact);text-align:end;}.count.invalid.svelte-18cyzaa {color:var(--sui-error-foreground-color);}.count.svelte-18cyzaa:not(.invalid) {color:var(--sui-success-foreground-color);}"};function XR(t,e){ae(e,!0),ke(t,Zne);const n=()=>H(ce,"$_",r),[r,i]=ve(),o=_(()=>e.fieldConfig.minlength),a=_(()=>e.fieldConfig.maxlength),s=_(()=>JR({fieldConfig:e.fieldConfig,value:e.currentValue})),l=_(()=>c(s).count),u=_(()=>c(s).hasMin),d=_(()=>c(s).hasMax),f=_(()=>c(s).invalid);var h=X(),p=M(h);{var g=m=>{var v=Xne(),b=F(v);{var y=k=>{var T=Fe();Z(()=>ne(T,`${c(o)??""}
|
|
666
665
|
/ `)),S(k,T)};U(b,k=>{c(u)&&k(y)})}var w=z(b,2);let x;var E=F(w),$=z(w,2);{var A=k=>{var T=Fe();Z(()=>ne(T,` /
|
|
667
666
|
${c(a)??""}`)),S(k,T)};U($,k=>{c(d)&&k(A)})}Z(k=>{Se(v,"aria-label",k),x=hn(w,1,"count svelte-18cyzaa",null,x,{invalid:c(f)}),ne(E,c(l))},[()=>n()(c(u)&&c(d)?c(l)===1?"character_counter.min_max.one":"character_counter.min_max.many":c(u)?c(l)===1?"character_counter.min.one":"character_counter.min.many":c(l)===1?"character_counter.max.one":"character_counter.max.many",{values:{count:c(l),min:c(o),max:c(a)}})]),S(m,v)};U(p,m=>{(c(u)||c(d))&&m(g)})}S(t,h),se(),i()}function Qne(t,e){ae(e,!0);const[n,r]=ve();let i=N(e,"currentValue",15),o=N(e,"required",3,!0),a=N(e,"readonly",3,!1),s=N(e,"invalid",3,!1);const{extraHint:l}=pr("field-editor")??{};let u=ie("");const d=_(()=>at(e.fieldConfig.type,"text")),f=_(()=>at(e.fieldConfig.prefix,"")),h=_(()=>at(e.fieldConfig.suffix,"")),p=()=>{let m=typeof i()=="string"?i():"";c(f)&&m.startsWith(c(f))&&(m=m.slice(c(f).length)),c(h)&&m.endsWith(c(h))&&(m=m.slice(0,-c(h).length)),c(u)!==m&&V(u,m,!0)},g=()=>{let m=c(u);m.trim()&&(c(f)||c(h))&&(m=`${c(f)}${m}${c(h)}`),i()!==m&&i(m)};ze(()=>{i(),xe(()=>{p()})}),ze(()=>{c(u),xe(()=>{g()})}),ze(()=>{l&&Je(l,XR)});{let m=_(()=>jr(e.locale));Yn(t,{get lang(){return c(m)},get type(){return c(d)},get inputmode(){return c(d)},flex:!0,get readonly(){return a()},get required(){return o()},get invalid(){return s()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return c(u)},set value(v){V(u,v,!0)}})}se(),r()}const ere=t=>{if(!Sh(t))return!1;const{origin:e,pathname:n,searchParams:r}=new URL(t);return!!((e==="https://www.youtube.com"||e==="https://www.youtube-nocookie.com")&&(n==="/watch"&&r.has("v")||n==="/playlist"&&r.has("list")||n.startsWith("/embed/"))||e==="https://youtu.be"&&n)},tre=t=>{const e="https://www.youtube-nocookie.com",{pathname:n,search:r,searchParams:i}=new URL(t);if(n==="/watch"){const o=new URLSearchParams(i);let a=`${e}/embed/${o.get("v")}`;return o.get("list")&&(o.delete("v"),o.set("listType","playlist"),a+=`?${o}`),a}return n==="/playlist"?`${e}/embed/videoseries${r}`:n.startsWith("/embed/")?`${e}${n}${r}`:`${e}/embed${n}${r}`};var nre=j('<iframe frameborder="0" allow="autoplay; encrypted-media; picture-in-picture" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" class="svelte-1l0g75t"></iframe>'),rre=j("<a> </a>"),ire=j('<div role="none"><!></div>');const ore={hash:"svelte-1l0g75t",code:"iframe.svelte-1l0g75t {display:block;margin:0 auto;width:100%;height:auto;aspect-ratio:16/9;}"};function are(t,e){ae(e,!0),ke(t,ore);const n=()=>H(ce,"$_",r),[r,i]=ve();let o=ie(!0);const a=_(()=>tre(e.url));Vt(()=>{window.addEventListener("securitypolicyviolation",({blockedURI:f,violatedDirective:h})=>{f===new URL(c(a)).origin&&h==="frame-src"&&V(o,!1)})});var s=ire(),l=F(s);{var u=f=>{yo(f,{children:(h,p)=>{var g=nre();Z((m,v)=>{Se(g,"src",m),Se(g,"title",v)},[()=>encodeURI(c(a)),()=>n()("youtube_video_player")]),S(h,g)},$$slots:{default:!0}})},d=f=>{var h=rre(),p=F(h);Z(g=>{Se(h,"href",g),ne(p,e.url)},[()=>encodeURI(e.url)]),S(f,h)};U(l,f=>{c(o)?f(u):f(d,!1)})}S(t,s),se(),i()}var sre=j("<a> </a>"),lre=j("<a> </a>"),cre=j('<p dir="auto"><!></p>');const ure={hash:"svelte-uv5j28",code:`.title.svelte-uv5j28 {font-size:var(--sui-font-size-xxx-large);font-weight:var(--sui-font-weight-bold);}
|
|
668
667
|
|
|
@@ -689,11 +688,11 @@ td.svelte-18v8t2h {border-width:0;}th.svelte-18v8t2h {padding-block:4px;color:va
|
|
|
689
688
|
@media (width < 1024px) {.wrapper.svelte-1ibgz0y .combobox {min-width:128px;--sui-textbox-height: 32px;--sui-button-medium-height: 32px;}
|
|
690
689
|
}.wrapper.svelte-1ibgz0y .combobox.error [role=combobox] {border-color:var(--sui-error-border-color);}.inner.svelte-1ibgz0y {display:contents;}.inner.svelte-1ibgz0y :is(.error, .error button[data-mode=edit]) {color:var(--sui-error-foreground-color) !important;}`};function tie(t,e){ae(e,!0),ke(t,eie);const n=()=>H(Xe,"$entryDraft",u),r=()=>H(mn,"$isSmallScreen",u),i=()=>H(Ta,"$isMediumScreen",u),o=()=>H(f(),"$thatPane",u),a=()=>H(ce,"$_",u),s=()=>H(e.thisPane,"$thisPane",u),l=()=>H(go,"$entryEditorSettings",u),[u,d]=ve();let f=N(e,"thatPane",19,()=>it(null));const h=_(()=>n()?.collection),p=_(()=>n()?.collectionFile),g=_(()=>(c(p)??c(h))?._i18n??Go),m=_(()=>c(g).allLocales),v=_(()=>r()||i()?[...c(m)]:c(m).filter(C=>!(o()?.mode==="edit"&&o().locale===C))),b=_(()=>Object.entries(n()?.validities??{}).some(([C,P])=>c(v).includes(C)&&Object.values(P??{}).some(({valid:O})=>!O))),y=_(()=>n()?.canPreview??!0),w=_(()=>r()||i()||c(m).length>=5),x=_(()=>c(w)?bc:Xm),E=_(()=>c(w)?Mr:Qf),$=_(()=>c(w)?void 0:"tertiary"),A=_(()=>c(w)?void 0:"small");var k=Qre(),T=F(k);{let C=_(()=>c(b)&&c(w)?"error":void 0),P=_(()=>a()("switch_locale")),O=_(()=>e.id.replace("-header","-body"));br(T,()=>c(x),(I,L)=>{L(I,{get class(){return c(C)},get"aria-label"(){return c(P)},get"aria-controls"(){return c(O)},children:(D,B)=>{var K=Zre(),G=F(K);rt(G,17,()=>c(v),yr,(R,q)=>{const J=_(()=>Uo(c(q))??c(q)),Q=_(()=>!n()?.currentLocales[c(q)]),ee=_(()=>Object.values(n()?.validities[c(q)]??{}).some(({valid:de})=>!de));var re=X(),te=M(re);{const de=me=>{var Ae=X(),Ce=M(Ae);{var _e=be=>{Qe(be,{name:"edit_off"})},fe=be=>{var Oe=X(),je=M(Oe);{var Re=Ie=>{Qe(Ie,{name:"error"})};U(je,Ie=>{c(ee)&&Ie(Re)},!0)}S(be,Oe)};U(Ce,be=>{c(Q)?be(_e):be(fe,!1)})}S(me,Ae)};let he=_(()=>c(J)),ue=_(()=>c(Q)?a()("locale_content_disabled_short"):c(ee)?a()("locale_content_error_short"):""),ge=_(()=>s()?.mode==="edit"&&s().locale===c(q)),ye=_(()=>c(ee)?"error":"");br(te,()=>c(E),(me,Ae)=>{Ae(me,{get variant(){return c($)},get size(){return c(A)},get label(){return c(J)},get"aria-label"(){return`${c(he)??""} ${c(ue)??""}`},get selected(){return c(ge)},get class(){return c(ye)},"data-mode":"edit",onSelect:()=>{Je(e.thisPane,{mode:"edit",locale:c(q)}),o()?.mode==="preview"&&Je(f(),{mode:"preview",locale:c(q)})},startIcon:de,$$slots:{startIcon:!0}})})}S(R,re)});var W=z(G,2);{var Y=R=>{var q=X(),J=M(q);{let Q=_(()=>a()("preview")),ee=_(()=>s()?.mode==="preview");br(J,()=>c(E),(re,te)=>{te(re,{get variant(){return c($)},get size(){return c(A)},get label(){return c(Q)},get selected(){return c(ee)},"data-mode":"preview",onSelect:()=>{Je(e.thisPane,{mode:"preview",locale:o()?.locale??""})}})})}S(R,q)};U(W,R=>{o()?.mode==="edit"&&c(y)&&l()?.showPreview&&R(Y)})}S(D,K)},$$slots:{default:!0}})})}S(t,k),se(),d()}function F$(t,e){ae(e,!0);const n=()=>H(ce,"$_",i),r=()=>H(e.thisPane,"$thisPane",i),[i,o]=ve();{const a=u=>{Qe(u,{name:"visibility"})};let s=_(()=>n()("preview")),l=_(()=>r()?.mode==="preview");et(t,{variant:"ghost",iconic:!0,get"aria-label"(){return c(s)},get pressed(){return c(l)},onclick:()=>{Je(e.thisPane,{mode:r()?.mode==="preview"?"edit":"preview",locale:r()?.locale??""})},startIcon:a,$$slots:{startIcon:!0}})}se(),o()}var nie=j("<!> <!>",1),rie=j('<h3 role="none"> </h3>'),iie=j("<!> <!>",1),oie=j("<!> <!> <!>",1),aie=j("<!> <!> <!> <!>",1),sie=j("<!> <!>",1),lie=j("<!> <!> <!>",1),cie=j('<div role="none" class="header svelte-uj56is"><!></div>');const uie={hash:"svelte-uj56is",code:`.header.svelte-uj56is {flex:none !important;}.header.svelte-uj56is > .sui.toolbar {margin-inline:auto;max-width:800px;}
|
|
691
690
|
@media (width < 768px) {.header.svelte-uj56is > .sui.toolbar {padding:0;}
|
|
692
|
-
}.header.svelte-uj56is > .sui.toolbar h3 {margin:0 8px;font-size:var(--sui-font-size-default);}`};function z$(t,e){ae(e,!0),ke(t,uie);const n=()=>H(Xe,"$entryDraft",u),r=()=>H(e.thisPane,"$thisPane",u),i=()=>H(ce,"$_",u),o=()=>H(mn,"$isSmallScreen",u),a=()=>H(Ta,"$isMediumScreen",u),s=()=>H(ht,"$prefs",u),l=()=>H(Cn,"$backend",u),[u,d]=ve();let f=N(e,"thatPane",19,()=>it(null));const h=_(()=>n()?.collection),p=_(()=>n()?.collectionFile),g=_(()=>n()?.originalEntry),m=_(()=>n()?.originalValues??{}),v=_(()=>(c(p)??c(h))?._i18n??Go),b=_(()=>c(v).i18nEnabled),y=_(()=>c(v).saveAllLocales),w=_(()=>c(v).allLocales),x=_(()=>c(v).defaultLocale),E=_(()=>n()?.currentLocales[r()?.locale??""]),$=_(()=>Object.values(n()?.currentLocales??{}).filter(L=>L).length===1),A=_(()=>c(b)?c(w).filter(L=>L!==r()?.locale):[]),k=_(()=>!!c(A).length),T=_(()=>r()?.locale&&!fn(Kn(n()?.currentValues[r().locale]),c(m)[r().locale])),C=_(()=>n()?.canPreview??!0),P=_(()=>c(h)&&c(g)&&r()?.locale?KO(c(g),r().locale,c(h),c(p)):void 0);var O=cie(),I=F(O);{let L=_(()=>i()("secondary"));io(I,{variant:"secondary",get"aria-label"(){return c(L)},children:(D,B)=>{var K=lie(),G=M(K);{var W=Q=>{var ee=nie(),re=M(ee);tie(re,{get id(){return e.id},get thisPane(){return e.thisPane},get thatPane(){return f()}});var te=z(re,2);{var de=he=>{F$(he,{get thisPane(){return e.thisPane}})};U(te,he=>{(o()||a())&&c(C)&&he(de)})}S(Q,ee)},Y=Q=>{var ee=X(),re=M(ee);{var te=he=>{var ue=rie(),ge=F(ue);Z(ye=>ne(ge,ye),[()=>r()?.mode==="preview"?i()("preview"):i()("edit")]),S(he,ue)},de=he=>{var ue=X(),ge=M(ue);{var ye=me=>{F$(me,{get thisPane(){return e.thisPane}})};U(ge,me=>{c(C)&&me(ye)},!0)}S(he,ue)};U(re,he=>{o()||a()?he(de,!1):he(te)},!0)}S(Q,ee)};U(G,Q=>{c(b)&&c(w).length>1?Q(W):Q(Y,!1)})}var R=z(G,2);_i(R,{flex:!0});var q=z(R,2);{var J=Q=>{const ee=_(()=>Uo(r().locale)??r().locale);var re=sie(),te=M(re);{var de=ue=>{wR(ue,{get locale(){return r().locale},get otherLocales(){return c(A)}})};U(te,ue=>{c(k)&&ue(de)})}var he=z(te,2);{const ue=ye=>{{let me=_(()=>i()("content_options_x_locale",{values:{locale:c(ee)}}));xr(ye,{get"aria-label"(){return c(me)},children:(Ae,Ce)=>{var _e=aie(),fe=M(_e);{var be=$e=>{E1($e,{get locale(){return r().locale},get otherLocales(){return c(A)}})};U(fe,$e=>{c(k)&&r()?.locale&&$e(be)})}var Oe=z(fe,2);{let $e=_(()=>i()("revert_changes")),Ee=_(()=>!c(T));vt(Oe,{get label(){return c($e)},get disabled(){return c(Ee)},onclick:()=>{L1({locale:r()?.locale})}})}var je=z(Oe,2);{var Re=$e=>{var Ee=iie(),qe=M(Ee);vi(qe,{});var Ke=z(qe,2);{let lt=_(()=>i()(c(E)?"disable_x_locale":Kn(n()?.currentValues[r().locale])?"reenable_x_locale":"enable_x_locale",{values:{locale:c(ee)}})),Te=_(()=>r().locale===c(x)||c(E)&&c($));vt(Ke,{get label(){return c(lt)},get disabled(){return c(Te)},onclick:()=>{WR(r()?.locale??"")}})}S($e,Ee)};U(je,$e=>{!c(y)&&r()?.locale&&$e(Re)})}var Ie=z(je,2);{var Pe=$e=>{var Ee=oie(),qe=M(Ee);vi(qe,{});var Ke=z(qe,2);{var lt=pe=>{{let Le=_(()=>i()("view_on_live_site"));vt(pe,{get label(){return c(Le)},onclick:()=>{window.open(c(P))}})}};U(Ke,pe=>{c(P)&&pe(lt)})}var Te=z(Ke,2);{var Me=pe=>{{let Le=_(()=>!l()?.repository?.blobBaseURL),Ne=_(()=>i()("view_on_x",{values:{service:l()?.repository?.label},default:i()("view_in_repository")}));vt(pe,{get disabled(){return c(Le)},get label(){return c(Ne)},onclick:()=>{c(g)&&r()&&window.open(a8(c(g),r().locale))}})}};U(Te,pe=>{s().devModeEnabled&&pe(Me)})}S($e,Ee)};U(Ie,$e=>{c(g)&&(c(P)||s().devModeEnabled)&&$e(Pe)})}S(Ae,_e)},$$slots:{default:!0}})}};let ge=_(()=>i()("show_content_options_x_locale",{values:{locale:c(ee)}}));ei(he,{variant:"ghost",iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return c(ge)},popup:ue,$$slots:{popup:!0}})}S(Q,re)};U(q,Q=>{r()?.mode==="edit"&&Q(J)})}S(D,K)},$$slots:{default:!0}})}Z(()=>Se(O,"id",e.id)),S(t,O),se(),d()}var die=j('<div role="none" class="svelte-wdavy7"><h3 class="svelte-wdavy7"> </h3></div>'),fie=j('<section class="svelte-wdavy7"><!> <div role="none" class="svelte-wdavy7"><!> <p class="error svelte-wdavy7"><!> <!></p></div></section>'),hie=j('<svelte-css-wrapper style="display: contents"><!></svelte-css-wrapper> <div role="none" class="locales svelte-wdavy7"></div>',1);const pie={hash:"svelte-wdavy7",code:"p.svelte-wdavy7:not(:empty) {margin-top:0;}.locales.svelte-wdavy7 {display:table;margin:16px 0 0;width:100%;}.locales.svelte-wdavy7 section:where(.svelte-wdavy7) {display:table-row;}.locales.svelte-wdavy7 section:where(.svelte-wdavy7) div:where(.svelte-wdavy7) {display:table-cell;vertical-align:middle;white-space:nowrap;}.locales.svelte-wdavy7 section:where(.svelte-wdavy7) div:where(.svelte-wdavy7):last-child {width:90%;}.locales.svelte-wdavy7 section:where(.svelte-wdavy7) h3:where(.svelte-wdavy7) {margin-inline-end:8px;font-size:inherit;}.locales.svelte-wdavy7 section:where(.svelte-wdavy7) p.error:where(.svelte-wdavy7) {margin:0;color:var(--sui-error-foreground-color);font-size:var(--sui-font-size-small);}"};function gie(t,e){const n=Jn();ae(e,!0),ke(t,pie);const r=()=>H(Xe,"$entryDraft",o),i=()=>H(ce,"$_",o),[o,a]=ve();let s=N(e,"open",15,!1);const l=_(()=>r()?.collectionName??""),u=_(()=>r()?.currentSlugs??{});let d=ie(At([]));const f=At({}),h=At({}),p=()=>{V(d,Sa(c(l)).map(g=>Object.values(g.locales).map(({slug:m})=>m)).flat(1).filter(g=>!Object.values(c(u)).includes(g)),!0),Object.assign(f,c(u)),Object.assign(h,Object.fromEntries(Object.keys(c(u)).map(g=>[g,!1])))};ze(()=>{s()&&p()});{let g=_(()=>i()("edit_slug")),m=_(()=>i()("update")),v=_(()=>fn(c(u),f)||Object.values(h).some(b=>b!==!1));xo(t,{get title(){return c(g)},get okLabel(){return c(m)},get okDisabled(){return c(v)},onOk:()=>{bt(Xe,xe(r).currentSlugs=f,xe(r))},get open(){return s()},set open(b){s(b)},children:(b,y)=>{var w=hie(),x=M(w);Vu(x,()=>({"--font-size":"var(--sui-font-size-small)"})),Hn(x.lastChild,{status:"warning",children:($,A)=>{var k=Fe();Z(T=>ne(k,T),[()=>i()("edit_slug_warning")]),S($,k)},$$slots:{default:!0}});var E=z(x,2);rt(E,21,()=>Object.keys(f),yr,($,A)=>{var k=fie(),T=F(k);{var C=G=>{var W=die(),Y=F(W),R=F(Y);Z(q=>ne(R,q),[()=>Uo(c(A))??c(A)]),S(G,W)};U(T,G=>{["_","_default"].includes(c(A))||G(C)})}var P=z(T,2),O=F(P);{let G=_(()=>h[c(A)]!==!1);Yn(O,{flex:!0,oninput:()=>{h[c(A)]=f[c(A)].trim()?c(d).includes(f[c(A)])?"duplicate":!1:"empty"},get invalid(){return c(G)},get"aria-errormessage"(){return`${n}-${c(A)??""}-error`},get value(){return f[c(A)]},set value(W){f[c(A)]=W}})}var I=z(O,2),L=F(I);{var D=G=>{var W=Fe();Z(Y=>ne(W,Y),[()=>i()("edit_slug_error.empty")]),S(G,W)};U(L,G=>{h[c(A)]==="empty"&&G(D)})}var B=z(L,2);{var K=G=>{var W=Fe();Z(Y=>ne(W,Y),[()=>i()("edit_slug_error.duplicate")]),S(G,W)};U(B,G=>{h[c(A)]==="duplicate"&&G(K)})}Z(()=>Se(I,"id",`${n}-${c(A)??""}-error`)),S($,k)}),S(b,w)},$$slots:{default:!0}})}se(),a()}const mie=({ids:t,assetPaths:e})=>{const n=oe(to);to.set(n.filter(r=>!t.includes(r.id))),Lf.set({...Sc,deleted:!0,count:t.length}),e.length&&Wn.update(r=>r.filter(i=>!e.includes(i.path)))},QR=async(t,e=[])=>{const n=oe(Cn)?.repository?.databaseName,r=n?new jo(n,"file-cache"):void 0,i=[],o="delete",a=await Promise.all(t.map(async({id:l,locales:u,slug:d})=>{const f=$u(Object.values(u).map(h=>h.path));return await Promise.all(f.map(async h=>{const p=await m1({cacheDB:r,previousPath:h});i.push({action:o,slug:d,path:h,previousSha:p})})),l})),s=e.map(({path:l,sha:u})=>(i.push({action:o,path:l,previousSha:u}),l));await ep({changes:i,options:{commitType:"delete",collection:oe(tr)}}),mie({ids:a,assetPaths:s})},vie="{{fields._slug}}",_ie="{{fields._slug | localize}}",bie=({collection:t,collectionFile:e,originalEntry:n})=>{const{_type:r}=t,{identifier_field:i="title",slug:o=`{{${i}}}`}=r==="entry"?t:{},{id:a}=n,s=a===void 0,{_i18n:l}=e??t,{allLocales:u,defaultLocale:d}=l,f=r==="entry"&&s,h=f&&o.includes(_ie),p=f&&(o.includes(vie)||h);return Object.fromEntries(u.map(g=>[g,p?g===d||h?!0:"readonly":!1]))},hf=({collection:t,collectionFile:e,originalEntry:n={},dynamicValues:r,expanderStates:i,isIndexFile:o=Ea(t,n)})=>{const a=t.name,s=e?.name,{id:l,slug:u,locales:d}=n,f=l===void 0,{fields:h=[],_i18n:p}=e??t,g=o?Mi(t):void 0,m=g?.fields??h,v=g?.editor?.preview??e?.editor?.preview??t.editor?.preview??oe(Pt)?.editor?.preview??!0,{allLocales:b,initialLocales:y,defaultLocale:w,canonicalSlug:{key:x="translationKey"}}=p,E=f?y:b.filter(T=>!!d?.[T]?.content),$=Object.fromEntries(b.map(T=>[T,E.includes(T)])),A=f?{}:x in(d?.[w]?.content??{})?Object.fromEntries(b.map(T=>[T,d?.[T]?.slug])):{_:d?.[w].slug},k=Object.fromEntries(E.map(T=>f?[T,ip({fields:m,locale:T,defaultLocale:w,dynamicValues:r})]:[T,structuredClone(d?.[T]?.content)]));Xe.set({id:f?crypto.randomUUID():l,createdAt:Date.now(),isNew:f,isIndexFile:o,canPreview:v,collectionName:a,collection:t,fileName:s,collectionFile:e,fields:m,originalEntry:f?void 0:n,defaultLocale:w,originalLocales:$,currentLocales:structuredClone($),originalSlugs:A,currentSlugs:structuredClone(A),originalValues:k,currentValues:Object.fromEntries(E.map(T=>[T,b1({draft:{collectionName:a,fileName:s,isIndexFile:o},locale:T,target:structuredClone(k[T])})])),files:{},extraValues:Object.fromEntries(b.map(T=>[T,{}])),validities:Object.fromEntries(b.map(T=>[T,{}])),expanderStates:i??{_:{}},slugEditor:bie({collection:t,collectionFile:e,originalEntry:n})}),VX({collectionName:a,fileName:s,slug:u})},yie=()=>{const t=oe(Xe),{collectionName:e,fileName:n,collection:r,collectionFile:i,currentValues:o,validities:a,isIndexFile:s}=t,{defaultLocale:l,canonicalSlug:{key:u}}=(i??r)._i18n;Object.entries(o).forEach(([d,f])=>{delete f[u];const h={collectionName:e,fileName:n,valueMap:f,isIndexFile:s};Object.keys(f).forEach(p=>{const g=gn({...h,keyPath:p});if(g?.widget==="uuid"&&(d===l||[!0,"translate"].includes(g?.i18n??!1))&&(f[p]=ZR(g)),g?.widget==="hidden"){if(Array.isArray(g.default)&&p.match(/\.\d+$/)&&(delete f[p],p=p.replace(/\.\d+$/,""),p in f))return;(d===l||[!0,"translate"].includes(g?.i18n??!1))&&Object.assign(f,UR({fieldConfig:g,keyPath:p,locale:d}))}})}),Object.keys(a).forEach(d=>{a[d]={}}),Xe.set({...t,id:crypto.randomUUID(),createdAt:Date.now(),isNew:!0,originalEntry:void 0,originalSlugs:{},currentSlugs:{}}),vy.set(!0)},j$=/\.\d+$/,wie={valueMissing:!1,tooShort:!1,tooLong:!1,rangeUnderflow:!1,rangeOverflow:!1,patternMismatch:!1,typeMismatch:!1},xie={get:(t,e)=>e==="valid"?!Object.values(t).some(Boolean):t[e]},kie=t=>{const{draft:e,locale:n,valueMap:r,componentName:i,validities:o}=t,{collection:a,collectionName:s,fileName:l,collectionFile:u,files:d,isIndexFile:f}=e;let{keyPath:h,value:p}=t;const g={collectionName:s,fileName:l,componentName:i,valueMap:r,keyPath:h.replace(hh,""),isIndexFile:f},m=gn({...g});if(!m)return;const{widget:v="string",i18n:b=!1,pattern:y}=m,w=cd(m),{min:x=0,max:E=1/0}=GP.includes(v)?m:{},{i18nEnabled:$,defaultLocale:A}=(u??a)._i18n;if(!i&&n!==A&&(!$||b===!1||b==="none"||b==="duplicate"))return;const k=Object.entries(r),T=ud({fieldConfig:m,locale:n}),C={...wie};if(v==="list"||w){if(h in o[n])return;const P=new RegExp(`^${Xt(h)}\\.\\d+`),O=Array.isArray(p)&&p.length?p.length:new Set(k.map(([I])=>I.match(P)?.[0]).filter(Boolean)).size;T&&!O?C.valueMissing=!0:typeof x=="number"&&O<x?C.rangeUnderflow=!0:typeof E=="number"&&O>E&&(C.rangeOverflow=!0)}if(v==="object"&&T&&!p&&(C.valueMissing=!0),v==="keyvalue"){const P=h.match(/(.+?)(?:\.[^.]*)?$/)?.[1],O=gn({...g,keyPath:P.replace(hh,"")});if(P in o[n]||O?.widget!=="keyvalue")return;h=P;const L=C1({entryDraft:Xe,keyPath:P,locale:n});T&&!L.length?C.valueMissing=!0:typeof x=="number"&&L.length<x?C.rangeUnderflow=!0:typeof E=="number"&&L.length>E&&(C.rangeOverflow=!0)}if(v==="code"){const{output_code_only:P=!1,keys:O={code:"code",lang:"lang"}}=m,I=h.match(`(.+)\\.(?:${O.code}|${O.lang})$`)?.[1]??"";if(I&&(h=I),h in o[n])return;P||(p=r[`${h}.${O.code}`])}if(Fx.includes(v)&&typeof p=="string"&&p.startsWith("blob:")&&(p=d[p]?.file?.name),!(["object","list","hidden","compute","keyvalue"].includes(v)||w)&&(typeof p=="string"&&(p=p.trim()),T&&(p==null||p===""||w&&!p.length)&&(C.valueMissing=!0),Array.isArray(y))){const P=fd(y[0]);P&&!P.test(String(p))&&(C.patternMismatch=!0)}if(["string","text"].includes(v)){const P=JR({fieldConfig:m,value:p});C.tooShort=P.tooShort,C.tooLong=P.tooLong}if(v==="string"&&p){const{type:P="text"}=m;if(P!=="text"){const O=Object.assign(document.createElement("input"),{type:P,value:p});C.typeMismatch=O.validity.typeMismatch}P==="email"&&!C.typeMismatch&&!p.split("@")[1]?.includes(".")&&(C.typeMismatch=!0)}if(v==="number"){const{value_type:P="int"}=m;typeof x=="number"&&p!==null&&Number(p)<x?C.rangeUnderflow=!0:typeof E=="number"&&p!==null&&Number(p)>E&&(C.rangeOverflow=!0),(P==="int"||P==="float")&&T&&p===null&&(C.typeMismatch=!0)}return new Proxy(C,xie)},eM=t=>{const{validities:e,locale:n,keyPath:r}=t,i=kie(t);let o=!0;return i&&(e[n][r]=i,i.valid||(o=!1)),o},Sie=({fieldConfig:t,validateArgs:e})=>{const{validities:n,locale:r,keyPath:i}=e,o=n[r][i]?.valid??eM(e),{widget:a="string"}=t;return a==="list"&&!hd(t).hasSubFields?{valid:o,validateItems:!1}:cd(t)?{valid:o,validateItems:!1}:{valid:o,validateItems:!0}},U$=t=>{const e=oe(Xe),{collectionName:n,fileName:r,isIndexFile:i,currentLocales:o}=e,a={},s={collectionName:n,fileName:r,isIndexFile:i,keyPath:"",valueMap:{}};let l=!0;return Object.entries(e[t]).forEach(([u,d])=>{const f=Object.entries(d);if(!o[u]){a[u]=Object.fromEntries(f.map(([p])=>[p,{valid:!0}]));return}const h={draft:e,locale:u,valueMap:d,validities:a};a[u]={},f.forEach(([p,g])=>{const[m]=p.match(hh)??[],v=m?d[`${m}__sc_component_name`]:void 0,b=gn({...s,keyPath:p.replace(hh,""),valueMap:d,componentName:v});if(b){if(j$.test(p)){const{valid:y,validateItems:w}=Sie({fieldConfig:b,validateArgs:{...h,keyPath:p.replace(j$,""),value:"",componentName:v}});if(y||(l=!1),!w)return}eM({...h,keyPath:p,value:g,componentName:v})||(l=!1)}})}),{valid:l,validities:a}},Eie=()=>{const{currentSlugs:t,slugEditor:e}=oe(Xe),n={};let r=!0;return Object.entries(t).forEach(([i,o])=>{const a=!!e[i]&&!o?.trim();a&&(r=!1),n[i]={_slug:{valueMissing:a,valid:!a}}}),{valid:r,validities:n}},Tie=()=>{const{valid:t,validities:e}=U$("currentValues"),{valid:n,validities:r}=U$("extraValues"),{valid:i,validities:o}=Eie();return Xe.update(a=>({...a,validities:Object.fromEntries(Object.keys(e).map(s=>[s,{...e[s],...r[s],...o[s]}]))})),t&&n&&i},$ie=({skipCI:t})=>{const e=!!oe(Cn)?.isGit&&!(t??oe(g1));Lf.set({...Sc,saved:!0,published:e,count:1}),Pg.set(e)},Aie=async({skipCI:t=void 0}={})=>{const e=oe(Xe),{collection:n,isNew:r,collectionName:i,fileName:o,currentValues:a}=e;if(!Tie())throw Lte({collectionName:i,fileName:o,currentValues:a}),new Error("validation_failed");const s=GN({draft:e}),{defaultLocaleSlug:l}=s,{savingEntry:u,changes:d,savingAssets:f}=await ZN({draft:e,slugs:s});let h;try{h=await ep({changes:d,savingEntries:[u],savingAssets:f,options:{commitType:r?"create":"update",collection:n,skipCI:t}})}catch(p){throw console.error(p.cause??p),new Error("saving_failed",{cause:p.cause??p})}return await aL({type:"postSave",draft:e,savingEntry:u}),$ie({skipCI:t}),wv(i,r?"":l),h.savedEntries[0]};var Cie=j("<!> <!>",1),Pie=j("<!> <!> <!>",1),Oie=j("<!> <!> <!> <!>",1),Lie=j('<!> <h2 role="none"><!></h2> <!> <!> <!> <!>',1),Iie=j('<div role="none" class="error svelte-zjrq31"> </div>'),Nie=j(" <!>",1),Rie=j("<!> <!> <!> <!> <!> <!>",1);const Mie={hash:"svelte-zjrq31",code:".error.svelte-zjrq31 {margin-top:8px;border-radius:var(--sui-control-medium-border-radius);padding:12px;background-color:var(--sui-secondary-background-color);font-size:var(--sui-font-size-default);line-height:1.5;}"};function Die(t,e){ae(e,!0),ke(t,Mie);const n=()=>H(Xe,"$entryDraft",p),r=()=>H(Bt,"$appLocale",p),i=()=>H(rR,"$entryDraftModified",p),o=()=>H(ht,"$prefs",p),a=()=>H(ce,"$_",p),s=()=>H(mn,"$isSmallScreen",p),l=()=>H(Ta,"$isMediumScreen",p),u=()=>H(go,"$entryEditorSettings",p),d=()=>H(p1,"$skipCIConfigured",p),f=()=>H(g1,"$skipCIEnabled",p),h=()=>H(_y,"$copyFromLocaleToast",p),[p,g]=ve(),m=Ce=>{const _e=_(()=>s()?vt:et);var fe=Cie(),be=M(fe);{let je=_(()=>a()("duplicate")),Re=_(()=>a()("duplicate_entry")),Ie=_(()=>c(C)||!!c(O)?.path||!Hm(c(P)));br(be,()=>c(_e),(Pe,$e)=>{$e(Pe,{variant:"ghost",get label(){return c(je)},get"aria-label"(){return c(Re)},get disabled(){return c(Ie)},onclick:()=>{Zt(`/collections/${c(K)}/new`,{replaceState:!0,notifyChange:!1,transitionType:"forwards"}),yie()}})})}var Oe=z(be,2);{let je=_(()=>a()("delete")),Re=_(()=>a()("delete_entry")),Ie=_(()=>c(O)?.delete===!1);br(Oe,()=>c(_e),(Pe,$e)=>{$e(Pe,{variant:"ghost",get label(){return c(je)},get"aria-label"(){return c(Re)},get disabled(){return c(Ie)},onclick:()=>{V(w,!0)}})})}S(Ce,fe)};let v=N(e,"disabled",3,!1),b=ie(!1),y=ie(!1),w=ie(!1),x=ie(!1),E=ie(""),$=ie(!1),A=ie(void 0);const k=_(()=>n()===void 0),T=_(()=>n()?.isNew??!0),C=_(()=>n()?.isIndexFile??!1),P=_(()=>n()?.collection),O=_(()=>c(P)?._type==="entry"?c(P):void 0),I=_(()=>n()?.collectionFile),L=_(()=>n()?.originalEntry),D=_(()=>(c(I)??c(P))?._i18n??Go),B=_(()=>c(D).defaultLocale),K=_(()=>c(P)?.name),G=_(()=>c(I)?.name),W=_(()=>r()&&c(P)?Za(c(P)):""),Y=_(()=>r()&&c(P)?Za(c(P),{useSingular:!0}):""),R=_(()=>n()?.canPreview??!0),q=_(()=>c(T)||i()),J=_(()=>Object.values(n()?.validities??{}).map(Ce=>Object.values(Ce).map(({valid:_e})=>!_e)).flat(1).filter(Boolean).length),Q=_(()=>c(K)&&c(L)&&da({collectionName:c(K),fileName:c(G)})?.entryRelative?_0({entry:c(L),collectionName:c(K),fileName:c(G),relative:!0}):[]),ee=_(()=>c(P)&&c(L)?KO(c(L),c(B),c(P),c(I)):void 0),re=()=>{qs(c(K)==="_singletons"?"/collections":`/collections/${c(K)}`)},te=async({skipCI:Ce=void 0}={})=>{if(V($,!0),!!c(P)){window.dispatchEvent(new CustomEvent("BeforeEntrySave")),await Rt(50);try{const _e=await Aie({skipCI:Ce});o()?.closeOnSave??!0?(re(),Je(Xe,null)):(c(T)&&Zt(`/collections/${c(K)}/entries/${_e.subPath}`,{replaceState:!0,notifyChange:!1,transitionType:"backwards"}),hf({collection:c(P),collectionFile:c(I),originalEntry:_e,expanderStates:n()?.expanderStates}))}catch(_e){_e.message==="validation_failed"?V(b,!0):_e.message==="saving_failed"?(V(x,!0),V(E,_e.cause?.message??_e.message??a()("unexpected_error"),!0)):(V(x,!0),V(E,""),console.error(_e))}finally{V($,!1)}}};var de=Rie(),he=M(de);{let Ce=_(()=>a()("primary"));io(he,{variant:"primary",get"aria-label"(){return c(Ce)},children:(_e,fe)=>{var be=Lie(),Oe=M(be);{let pe=_(()=>a()("cancel_editing"));oc(Oe,{get"aria-label"(){return c(pe)},get useShortcut(){return o().closeWithEscape},onclick:()=>{re()}})}var je=z(Oe,2),Re=F(je);{var Ie=pe=>{Ur(pe,{children:(Le,Ne)=>{var nt=X(),We=M(nt);{var Ze=_t=>{var Ft=Fe();Z(ln=>ne(Ft,ln),[()=>a()("create_entry_title",{values:{name:c(Y)}})]),S(_t,Ft)},st=_t=>{const Ft=_(()=>c(I)?Fh(c(I)):c(P)&&c(L)&&r()?ld(c(P),c(L)):"");var ln=X(),qt=M(ln);{var Et=wt=>{var Lt=Fe();Z(()=>ne(Lt,c(Ft))),S(wt,Lt)},Yt=wt=>{var Lt=Fe();Z(gr=>ne(Lt,gr),[()=>a()("edit_entry_title",{values:{collection:c(W),entry:c(Ft)}})]),S(wt,Lt)};U(qt,wt=>{s()?wt(Et):wt(Yt,!1)})}S(_t,ln)};U(We,_t=>{c(T)?_t(Ze):_t(st,!1)})}S(Le,nt)},$$slots:{default:!0}})};U(Re,pe=>{c(k)||pe(Ie)})}var Pe=z(je,2);{var $e=pe=>{{let Le=_(()=>a()("view_on_live_site"));et(pe,{variant:"tertiary",get label(){return c(Le)},onclick:()=>{window.open(c(ee))}})}};U(Pe,pe=>{!v()&&c(ee)&&pe($e)})}var Ee=z(Pe,2);{var qe=pe=>{m(pe)};U(Ee,pe=>{!s()&&!v()&&!c(I)&&!c(T)&&pe(qe)})}var Ke=z(Ee,2);{const pe=Ne=>{{let nt=_(()=>a()("editor_options"));xr(Ne,{get"aria-label"(){return c(nt)},children:(We,Ze)=>{var st=Oie(),_t=M(st);{var Ft=wt=>{m(wt)};U(_t,wt=>{s()&&!v()&&!c(I)&&!c(T)&&wt(Ft)})}var ln=z(_t,2);{let wt=_(()=>a()("edit_slug")),Lt=_(()=>!!c(I)||c(T)||c(C)||c(O)?.delete===!1);vt(ln,{get label(){return c(wt)},get disabled(){return c(Lt)},onclick:()=>{V(y,!0)}})}var qt=z(ln,2);{let wt=_(()=>a()("revert_all_changes")),Lt=_(()=>!c(q));vt(qt,{get label(){return c(wt)},get disabled(){return c(Lt)},onclick:()=>{L1()}})}var Et=z(qt,2);{var Yt=wt=>{var Lt=Pie(),gr=M(Lt);vi(gr,{});var vn=z(gr,2);{let kt=_(()=>a()("show_preview")),cn=_(()=>u()?.showPreview),ut=_(()=>!c(R));Lg(vn,{get label(){return c(kt)},get checked(){return c(cn)},get disabled(){return c(ut)},onChange:()=>{go.update((pt={})=>({...pt,showPreview:!pt.showPreview}))}})}var Xn=z(vn,2);{let kt=_(()=>a()("sync_scrolling")),cn=_(()=>u()?.syncScrolling),ut=_(()=>!c(R)&&Object.keys(n()?.currentValues??{}).length===1);Lg(Xn,{get label(){return c(kt)},get checked(){return c(cn)},get disabled(){return c(ut)},onChange:()=>{go.update((pt={})=>({...pt,syncScrolling:!pt.syncScrolling}))}})}S(wt,Lt)};U(Et,wt=>{s()||l()||wt(Yt)})}S(We,st)},$$slots:{default:!0}})}};let Le=_(()=>a()("show_editor_options"));St(ei(Ke,{get disabled(){return v()},variant:"ghost",iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return c(Le)},popup:pe,$$slots:{popup:!0}}),Ne=>V(A,Ne,!0),()=>c(A))}var lt=z(Ke,2);{var Te=pe=>{{const Le=We=>{xr(We,{children:(Ze,st)=>{{let _t=_(()=>a()(f()?"save_and_publish":"save_without_publishing"));vt(Ze,{get label(){return c(_t)},onclick:()=>{te({skipCI:!f()})}})}},$$slots:{default:!0}})};let Ne=_(()=>a()(c($)?"saving":"save")),nt=_(()=>v()||!c(q)||c($));hL(pe,{variant:"primary",get label(){return c(Ne)},get disabled(){return c(nt)},keyShortcuts:"Accel+S",onclick:()=>{te()},popup:Le,$$slots:{popup:!0}})}},Me=pe=>{{let Le=_(()=>a()(c($)?"saving":"save")),Ne=_(()=>v()||!c(q)||c($));et(pe,{variant:"primary",get label(){return c(Le)},get disabled(){return c(Ne)},keyShortcuts:"Accel+S",onclick:()=>{te()}})}};U(lt,pe=>{d()?pe(Te):pe(Me,!1)})}S(_e,be)},$$slots:{default:!0}})}var ue=z(he,2);nr(ue,{get show(){return c(b)},set show(Ce){V(b,Ce,!0)},children:(Ce,_e)=>{Hn(Ce,{status:"error",children:(fe,be)=>{var Oe=Fe();Z(je=>ne(Oe,je),[()=>a()(c(J)===1?"entry_validation_error":"entry_validation_errors",{values:{count:c(J)}})]),S(fe,Oe)},$$slots:{default:!0}})},$$slots:{default:!0}});var ge=z(ue,2);nr(ge,{get id(){return h().id},get show(){return h().show},set show(Ce){bt(_y,xe(h).show=Ce,xe(h))},children:(Ce,_e)=>{const fe=_(()=>{const{status:be,message:Oe,count:je,sourceLanguage:Re}=h();return{status:be,message:Oe,count:je,sourceLanguage:Re}});Hn(Ce,{get status(){return c(fe).status},children:(be,Oe)=>{var je=Fe();Z(Re=>ne(je,Re),[()=>a()(`editor.${c(fe).message}`,{values:{count:c(fe).count,source:c(fe).sourceLanguage?Uo(c(fe).sourceLanguage)??c(fe).sourceLanguage:""}})]),S(be,je)},$$slots:{default:!0}})},$$slots:{default:!0}});var ye=z(ge,2);gie(ye,{get open(){return c(y)},set open(Ce){V(y,Ce,!0)}});var me=z(ye,2);{let Ce=_(()=>a()("delete_entry")),_e=_(()=>a()("delete"));md(me,{get title(){return c(Ce)},get okLabel(){return c(_e)},onOk:async()=>{c(L)&&await QR([c(L)],c(Q)),re()},onClose:()=>{c(A)?.focus()},get open(){return c(w)},set open(fe){V(w,fe,!0)},children:(fe,be)=>{var Oe=Fe();Z(je=>ne(Oe,je),[()=>a()(c(Q).length?"confirm_deleting_this_entry_with_assets":"confirm_deleting_this_entry")]),S(fe,Oe)},$$slots:{default:!0}})}var Ae=z(me,2);{let Ce=_(()=>a()("saving_entry.error.title"));Zm(Ae,{get title(){return c(Ce)},onClose:()=>{c(A)?.focus()},get open(){return c(x)},set open(_e){V(x,_e,!0)},children:(_e,fe)=>{var be=Nie(),Oe=M(be),je=z(Oe);{var Re=Ie=>{var Pe=Iie(),$e=F(Pe);Z(()=>ne($e,c(E))),S(Ie,Pe)};U(je,Ie=>{c(E)&&Ie(Re)})}Z(Ie=>ne(Oe,`${Ie??""} `),[()=>a()("saving_entry.error.description")]),S(_e,be)},$$slots:{default:!0}})}S(t,de),se(),g()}var Fie=j('<div role="none"><!></div> <div role="none"><!></div>',1),zie=j("<!> <!>",1),jie=j("<!> <!>",1),Uie=j("<!> <!>",1),Bie=j('<div role="none" class="cols svelte-jrunrx"><!></div>'),qie=j("<!> <!>",1),Hie=j('<div role="group" class="wrapper content-editor svelte-jrunrx"><!></div> <!> <!>',1);const Kie={hash:"svelte-jrunrx",code:`.wrapper.svelte-jrunrx {position:fixed;inset:0;z-index:100;display:flex;flex-direction:column;background-color:var(--sui-secondary-background-color);transition:filter 250ms;}.wrapper[hidden].svelte-jrunrx {display:none;}.wrapper[inert].svelte-jrunrx {filter:opacity(0);}.wrapper.svelte-jrunrx .cols:where(.svelte-jrunrx) {flex:auto;overflow:hidden;display:flex;gap:4px;background-color:var(--sui-secondary-background-color);}.wrapper.svelte-jrunrx .cols:where(.svelte-jrunrx) > div {display:flex;flex-direction:column;min-width:480px;background-color:var(--sui-primary-background-color);transition:all 500ms;}.wrapper.svelte-jrunrx .cols:where(.svelte-jrunrx) > div[data-mode=edit] {flex:1 1;}.wrapper.svelte-jrunrx .cols:where(.svelte-jrunrx) > div[data-mode=preview] {flex:2 1;}
|
|
691
|
+
}.header.svelte-uj56is > .sui.toolbar h3 {margin:0 8px;font-size:var(--sui-font-size-default);}`};function z$(t,e){ae(e,!0),ke(t,uie);const n=()=>H(Xe,"$entryDraft",u),r=()=>H(e.thisPane,"$thisPane",u),i=()=>H(ce,"$_",u),o=()=>H(mn,"$isSmallScreen",u),a=()=>H(Ta,"$isMediumScreen",u),s=()=>H(ht,"$prefs",u),l=()=>H(Cn,"$backend",u),[u,d]=ve();let f=N(e,"thatPane",19,()=>it(null));const h=_(()=>n()?.collection),p=_(()=>n()?.collectionFile),g=_(()=>n()?.originalEntry),m=_(()=>n()?.originalValues??{}),v=_(()=>(c(p)??c(h))?._i18n??Go),b=_(()=>c(v).i18nEnabled),y=_(()=>c(v).saveAllLocales),w=_(()=>c(v).allLocales),x=_(()=>c(v).defaultLocale),E=_(()=>n()?.currentLocales[r()?.locale??""]),$=_(()=>Object.values(n()?.currentLocales??{}).filter(L=>L).length===1),A=_(()=>c(b)?c(w).filter(L=>L!==r()?.locale):[]),k=_(()=>!!c(A).length),T=_(()=>r()?.locale&&!fn(Kn(n()?.currentValues[r().locale]),c(m)[r().locale])),C=_(()=>n()?.canPreview??!0),P=_(()=>c(h)&&c(g)&&r()?.locale?KO(c(g),r().locale,c(h),c(p)):void 0);var O=cie(),I=F(O);{let L=_(()=>i()("secondary"));io(I,{variant:"secondary",get"aria-label"(){return c(L)},children:(D,B)=>{var K=lie(),G=M(K);{var W=Q=>{var ee=nie(),re=M(ee);tie(re,{get id(){return e.id},get thisPane(){return e.thisPane},get thatPane(){return f()}});var te=z(re,2);{var de=he=>{F$(he,{get thisPane(){return e.thisPane}})};U(te,he=>{(o()||a())&&c(C)&&he(de)})}S(Q,ee)},Y=Q=>{var ee=X(),re=M(ee);{var te=he=>{var ue=rie(),ge=F(ue);Z(ye=>ne(ge,ye),[()=>r()?.mode==="preview"?i()("preview"):i()("edit")]),S(he,ue)},de=he=>{var ue=X(),ge=M(ue);{var ye=me=>{F$(me,{get thisPane(){return e.thisPane}})};U(ge,me=>{c(C)&&me(ye)},!0)}S(he,ue)};U(re,he=>{o()||a()?he(de,!1):he(te)},!0)}S(Q,ee)};U(G,Q=>{c(b)&&c(w).length>1?Q(W):Q(Y,!1)})}var R=z(G,2);_i(R,{flex:!0});var q=z(R,2);{var J=Q=>{const ee=_(()=>Uo(r().locale)??r().locale);var re=sie(),te=M(re);{var de=ue=>{wR(ue,{get locale(){return r().locale},get otherLocales(){return c(A)}})};U(te,ue=>{c(k)&&ue(de)})}var he=z(te,2);{const ue=ye=>{{let me=_(()=>i()("content_options_x_locale",{values:{locale:c(ee)}}));xr(ye,{get"aria-label"(){return c(me)},children:(Ae,Ce)=>{var _e=aie(),fe=M(_e);{var be=$e=>{E1($e,{get locale(){return r().locale},get otherLocales(){return c(A)}})};U(fe,$e=>{c(k)&&r()?.locale&&$e(be)})}var Oe=z(fe,2);{let $e=_(()=>i()("revert_changes")),Ee=_(()=>!c(T));vt(Oe,{get label(){return c($e)},get disabled(){return c(Ee)},onclick:()=>{L1({locale:r()?.locale})}})}var je=z(Oe,2);{var Re=$e=>{var Ee=iie(),qe=M(Ee);vi(qe,{});var Ke=z(qe,2);{let lt=_(()=>i()(c(E)?"disable_x_locale":Kn(n()?.currentValues[r().locale])?"reenable_x_locale":"enable_x_locale",{values:{locale:c(ee)}})),Te=_(()=>r().locale===c(x)||c(E)&&c($));vt(Ke,{get label(){return c(lt)},get disabled(){return c(Te)},onclick:()=>{WR(r()?.locale??"")}})}S($e,Ee)};U(je,$e=>{!c(y)&&r()?.locale&&$e(Re)})}var Ie=z(je,2);{var Pe=$e=>{var Ee=oie(),qe=M(Ee);vi(qe,{});var Ke=z(qe,2);{var lt=pe=>{{let Le=_(()=>i()("view_on_live_site"));vt(pe,{get label(){return c(Le)},onclick:()=>{window.open(c(P))}})}};U(Ke,pe=>{c(P)&&pe(lt)})}var Te=z(Ke,2);{var Me=pe=>{{let Le=_(()=>!l()?.repository?.blobBaseURL),Ne=_(()=>i()("view_on_x",{values:{service:l()?.repository?.label},default:i()("view_in_repository")}));vt(pe,{get disabled(){return c(Le)},get label(){return c(Ne)},onclick:()=>{c(g)&&r()&&window.open(a8(c(g),r().locale))}})}};U(Te,pe=>{s().devModeEnabled&&pe(Me)})}S($e,Ee)};U(Ie,$e=>{c(g)&&(c(P)||s().devModeEnabled)&&$e(Pe)})}S(Ae,_e)},$$slots:{default:!0}})}};let ge=_(()=>i()("show_content_options_x_locale",{values:{locale:c(ee)}}));ei(he,{variant:"ghost",iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return c(ge)},popup:ue,$$slots:{popup:!0}})}S(Q,re)};U(q,Q=>{r()?.mode==="edit"&&Q(J)})}S(D,K)},$$slots:{default:!0}})}Z(()=>Se(O,"id",e.id)),S(t,O),se(),d()}var die=j('<div role="none" class="svelte-wdavy7"><h3 class="svelte-wdavy7"> </h3></div>'),fie=j('<section class="svelte-wdavy7"><!> <div role="none" class="svelte-wdavy7"><!> <p class="error svelte-wdavy7"><!> <!></p></div></section>'),hie=j('<svelte-css-wrapper style="display: contents"><!></svelte-css-wrapper> <div role="none" class="locales svelte-wdavy7"></div>',1);const pie={hash:"svelte-wdavy7",code:"p.svelte-wdavy7:not(:empty) {margin-top:0;}.locales.svelte-wdavy7 {display:table;margin:16px 0 0;width:100%;}.locales.svelte-wdavy7 section:where(.svelte-wdavy7) {display:table-row;}.locales.svelte-wdavy7 section:where(.svelte-wdavy7) div:where(.svelte-wdavy7) {display:table-cell;vertical-align:middle;white-space:nowrap;}.locales.svelte-wdavy7 section:where(.svelte-wdavy7) div:where(.svelte-wdavy7):last-child {width:90%;}.locales.svelte-wdavy7 section:where(.svelte-wdavy7) h3:where(.svelte-wdavy7) {margin-inline-end:8px;font-size:inherit;}.locales.svelte-wdavy7 section:where(.svelte-wdavy7) p.error:where(.svelte-wdavy7) {margin:0;color:var(--sui-error-foreground-color);font-size:var(--sui-font-size-small);}"};function gie(t,e){const n=Jn();ae(e,!0),ke(t,pie);const r=()=>H(Xe,"$entryDraft",o),i=()=>H(ce,"$_",o),[o,a]=ve();let s=N(e,"open",15,!1);const l=_(()=>r()?.collectionName??""),u=_(()=>r()?.currentSlugs??{});let d=ie(At([]));const f=At({}),h=At({}),p=()=>{V(d,Sa(c(l)).map(g=>Object.values(g.locales).map(({slug:m})=>m)).flat(1).filter(g=>!Object.values(c(u)).includes(g)),!0),Object.assign(f,c(u)),Object.assign(h,Object.fromEntries(Object.keys(c(u)).map(g=>[g,!1])))};ze(()=>{s()&&p()});{let g=_(()=>i()("edit_slug")),m=_(()=>i()("update")),v=_(()=>fn(c(u),f)||Object.values(h).some(b=>b!==!1));xo(t,{get title(){return c(g)},get okLabel(){return c(m)},get okDisabled(){return c(v)},onOk:()=>{bt(Xe,xe(r).currentSlugs=f,xe(r))},get open(){return s()},set open(b){s(b)},children:(b,y)=>{var w=hie(),x=M(w);Vu(x,()=>({"--font-size":"var(--sui-font-size-small)"})),Hn(x.lastChild,{status:"warning",children:($,A)=>{var k=Fe();Z(T=>ne(k,T),[()=>i()("edit_slug_warning")]),S($,k)},$$slots:{default:!0}});var E=z(x,2);rt(E,21,()=>Object.keys(f),yr,($,A)=>{var k=fie(),T=F(k);{var C=G=>{var W=die(),Y=F(W),R=F(Y);Z(q=>ne(R,q),[()=>Uo(c(A))??c(A)]),S(G,W)};U(T,G=>{["_","_default"].includes(c(A))||G(C)})}var P=z(T,2),O=F(P);{let G=_(()=>h[c(A)]!==!1);Yn(O,{flex:!0,oninput:()=>{h[c(A)]=f[c(A)].trim()?c(d).includes(f[c(A)])?"duplicate":!1:"empty"},get invalid(){return c(G)},get"aria-errormessage"(){return`${n}-${c(A)??""}-error`},get value(){return f[c(A)]},set value(W){f[c(A)]=W}})}var I=z(O,2),L=F(I);{var D=G=>{var W=Fe();Z(Y=>ne(W,Y),[()=>i()("edit_slug_error.empty")]),S(G,W)};U(L,G=>{h[c(A)]==="empty"&&G(D)})}var B=z(L,2);{var K=G=>{var W=Fe();Z(Y=>ne(W,Y),[()=>i()("edit_slug_error.duplicate")]),S(G,W)};U(B,G=>{h[c(A)]==="duplicate"&&G(K)})}Z(()=>Se(I,"id",`${n}-${c(A)??""}-error`)),S($,k)}),S(b,w)},$$slots:{default:!0}})}se(),a()}const mie=({ids:t,assetPaths:e})=>{const n=oe(to);to.set(n.filter(r=>!t.includes(r.id))),Lf.set({...Sc,deleted:!0,count:t.length}),e.length&&Wn.update(r=>r.filter(i=>!e.includes(i.path)))},QR=async(t,e=[])=>{const n=oe(Cn)?.repository?.databaseName,r=n?new jo(n,"file-cache"):void 0,i=[],o="delete",a=await Promise.all(t.map(async({id:l,locales:u,slug:d})=>{const f=$u(Object.values(u).map(h=>h.path));return await Promise.all(f.map(async h=>{const p=await m1({cacheDB:r,previousPath:h});i.push({action:o,slug:d,path:h,previousSha:p})})),l})),s=e.map(({path:l,sha:u})=>(i.push({action:o,path:l,previousSha:u}),l));await ep({changes:i,options:{commitType:"delete",collection:oe(tr)}}),mie({ids:a,assetPaths:s})},vie="{{fields._slug}}",_ie="{{fields._slug | localize}}",bie=({collection:t,collectionFile:e,originalEntry:n})=>{const{_type:r}=t,{identifier_field:i="title",slug:o=`{{${i}}}`}=r==="entry"?t:{},{id:a}=n,s=a===void 0,{_i18n:l}=e??t,{allLocales:u,defaultLocale:d}=l,f=r==="entry"&&s,h=f&&o.includes(_ie),p=f&&(o.includes(vie)||h);return Object.fromEntries(u.map(g=>[g,p?g===d||h?!0:"readonly":!1]))},hf=({collection:t,collectionFile:e,originalEntry:n={},dynamicValues:r,expanderStates:i,isIndexFile:o=Ea(t,n)})=>{const a=t.name,s=e?.name,{id:l,slug:u,locales:d}=n,f=l===void 0,{fields:h=[],_i18n:p}=e??t,g=o?Mi(t):void 0,m=g?.fields??h,v=g?.editor?.preview??e?.editor?.preview??t.editor?.preview??oe(Pt)?.editor?.preview??!0,{allLocales:b,initialLocales:y,defaultLocale:w,canonicalSlug:{key:x="translationKey"}}=p,E=f?y:b.filter(T=>!!d?.[T]?.content),$=Object.fromEntries(b.map(T=>[T,E.includes(T)])),A=f?{}:x in(d?.[w]?.content??{})?Object.fromEntries(b.map(T=>[T,d?.[T]?.slug])):{_:d?.[w].slug},k=Object.fromEntries(E.map(T=>f?[T,ip({fields:m,locale:T,defaultLocale:w,dynamicValues:r})]:[T,structuredClone(d?.[T]?.content)]));Xe.set({id:f?crypto.randomUUID():l,createdAt:Date.now(),isNew:f,isIndexFile:o,canPreview:v,collectionName:a,collection:t,fileName:s,collectionFile:e,fields:m,originalEntry:f?void 0:n,defaultLocale:w,originalLocales:$,currentLocales:structuredClone($),originalSlugs:A,currentSlugs:structuredClone(A),originalValues:k,currentValues:Object.fromEntries(E.map(T=>[T,b1({draft:{collectionName:a,fileName:s,isIndexFile:o},locale:T,target:structuredClone(k[T])})])),files:{},extraValues:Object.fromEntries(b.map(T=>[T,{}])),validities:Object.fromEntries(b.map(T=>[T,{}])),expanderStates:i??{_:{}},slugEditor:bie({collection:t,collectionFile:e,originalEntry:n})}),VX({collectionName:a,fileName:s,slug:u})},yie=()=>{const t=oe(Xe),{collectionName:e,fileName:n,collection:r,collectionFile:i,currentValues:o,validities:a,isIndexFile:s}=t,{defaultLocale:l,canonicalSlug:{key:u}}=(i??r)._i18n;Object.entries(o).forEach(([d,f])=>{delete f[u];const h={collectionName:e,fileName:n,valueMap:f,isIndexFile:s};Object.keys(f).forEach(p=>{const g=gn({...h,keyPath:p});if(g?.widget==="uuid"&&(d===l||[!0,"translate"].includes(g?.i18n??!1))&&(f[p]=ZR(g)),g?.widget==="hidden"){if(Array.isArray(g.default)&&p.match(/\.\d+$/)&&(delete f[p],p=p.replace(/\.\d+$/,""),p in f))return;(d===l||[!0,"translate"].includes(g?.i18n??!1))&&Object.assign(f,UR({fieldConfig:g,keyPath:p,locale:d}))}})}),Object.keys(a).forEach(d=>{a[d]={}}),Xe.set({...t,id:crypto.randomUUID(),createdAt:Date.now(),isNew:!0,originalEntry:void 0,originalSlugs:{},currentSlugs:{}}),vy.set(!0)},j$=/\.\d+$/,wie={valueMissing:!1,tooShort:!1,tooLong:!1,rangeUnderflow:!1,rangeOverflow:!1,patternMismatch:!1,typeMismatch:!1},xie={get:(t,e)=>e==="valid"?!Object.values(t).some(Boolean):t[e]},kie=t=>{const{draft:e,locale:n,valueMap:r,componentName:i,validities:o}=t,{collection:a,collectionName:s,fileName:l,collectionFile:u,files:d,isIndexFile:f}=e;let{keyPath:h,value:p}=t;const g={collectionName:s,fileName:l,componentName:i,valueMap:r,keyPath:h.replace(hh,""),isIndexFile:f},m=gn({...g});if(!m)return;const{widget:v="string",i18n:b=!1,pattern:y}=m,w=cd(m),{min:x=0,max:E=1/0}=GP.includes(v)?m:{},{i18nEnabled:$,defaultLocale:A}=(u??a)._i18n;if(!i&&n!==A&&(!$||b===!1||b==="none"||b==="duplicate"))return;const k=Object.entries(r),T=ud({fieldConfig:m,locale:n}),C={...wie};if(v==="list"||w){if(h in o[n])return;const P=new RegExp(`^${Xt(h)}\\.\\d+`),O=Array.isArray(p)&&p.length?p.length:new Set(k.map(([I])=>I.match(P)?.[0]).filter(Boolean)).size;T&&!O?C.valueMissing=!0:typeof x=="number"&&O<x?C.rangeUnderflow=!0:typeof E=="number"&&O>E&&(C.rangeOverflow=!0)}if(v==="object"&&T&&!p&&(C.valueMissing=!0),v==="keyvalue"){const P=h.match(/(.+?)(?:\.[^.]*)?$/)?.[1],O=gn({...g,keyPath:P.replace(hh,"")});if(P in o[n]||O?.widget!=="keyvalue")return;h=P;const L=C1({entryDraft:Xe,keyPath:P,locale:n});T&&!L.length?C.valueMissing=!0:typeof x=="number"&&L.length<x?C.rangeUnderflow=!0:typeof E=="number"&&L.length>E&&(C.rangeOverflow=!0)}if(v==="code"){const{output_code_only:P=!1,keys:O={code:"code",lang:"lang"}}=m,I=h.match(`(.+)\\.(?:${O.code}|${O.lang})$`)?.[1]??"";if(I&&(h=I),h in o[n])return;P||(p=r[`${h}.${O.code}`])}if(Fx.includes(v)&&typeof p=="string"&&p.startsWith("blob:")&&(p=d[p]?.file?.name),!(["object","list","hidden","compute","keyvalue"].includes(v)||w)&&(typeof p=="string"&&(p=p.trim()),T&&(p==null||p===""||w&&!p.length)&&(C.valueMissing=!0),Array.isArray(y))){const P=fd(y[0]);P&&!P.test(String(p))&&(C.patternMismatch=!0)}if(["string","text"].includes(v)){const P=JR({fieldConfig:m,value:p});C.tooShort=P.tooShort,C.tooLong=P.tooLong}if(v==="string"&&p){const{type:P="text"}=m;if(P!=="text"){const O=Object.assign(document.createElement("input"),{type:P,value:p});C.typeMismatch=O.validity.typeMismatch}P==="email"&&!C.typeMismatch&&!p.split("@")[1]?.includes(".")&&(C.typeMismatch=!0)}if(v==="number"){const{value_type:P="int"}=m;typeof x=="number"&&p!==null&&Number(p)<x?C.rangeUnderflow=!0:typeof E=="number"&&p!==null&&Number(p)>E&&(C.rangeOverflow=!0),(P==="int"||P==="float")&&T&&p===null&&(C.typeMismatch=!0)}return new Proxy(C,xie)},eM=t=>{const{validities:e,locale:n,keyPath:r}=t,i=kie(t);let o=!0;return i&&(e[n][r]=i,i.valid||(o=!1)),o},Sie=({fieldConfig:t,validateArgs:e})=>{const{validities:n,locale:r,keyPath:i}=e,o=n[r][i]?.valid??eM(e),{widget:a="string"}=t;return a==="list"&&!hd(t).hasSubFields?{valid:o,validateItems:!1}:cd(t)?{valid:o,validateItems:!1}:{valid:o,validateItems:!0}},U$=t=>{const e=oe(Xe),{collectionName:n,fileName:r,isIndexFile:i,currentLocales:o}=e,a={},s={collectionName:n,fileName:r,isIndexFile:i,keyPath:"",valueMap:{}};let l=!0;return Object.entries(e[t]).forEach(([u,d])=>{const f=Object.entries(d);if(!o[u]){a[u]=Object.fromEntries(f.map(([p])=>[p,{valid:!0}]));return}const h={draft:e,locale:u,valueMap:d,validities:a};a[u]={},f.forEach(([p,g])=>{const[m]=p.match(hh)??[],v=m?d[`${m}__sc_component_name`]:void 0,b=gn({...s,keyPath:p.replace(hh,""),valueMap:d,componentName:v});if(b){if(j$.test(p)){const{valid:y,validateItems:w}=Sie({fieldConfig:b,validateArgs:{...h,keyPath:p.replace(j$,""),value:"",componentName:v}});if(y||(l=!1),!w)return}eM({...h,keyPath:p,value:g,componentName:v})||(l=!1)}})}),{valid:l,validities:a}},Eie=()=>{const{currentSlugs:t,slugEditor:e}=oe(Xe),n={};let r=!0;return Object.entries(t).forEach(([i,o])=>{const a=!!e[i]&&!o?.trim();a&&(r=!1),n[i]={_slug:{valueMissing:a,valid:!a}}}),{valid:r,validities:n}},Tie=()=>{const{valid:t,validities:e}=U$("currentValues"),{valid:n,validities:r}=U$("extraValues"),{valid:i,validities:o}=Eie();return Xe.update(a=>({...a,validities:Object.fromEntries(Object.keys(e).map(s=>[s,{...e[s],...r[s],...o[s]}]))})),t&&n&&i},$ie=({skipCI:t})=>{const e=!!oe(Cn)?.isGit&&!(t??oe(g1));Lf.set({...Sc,saved:!0,published:e,count:1}),Pg.set(e)},Aie=async({skipCI:t=void 0}={})=>{const e=oe(Xe),{collection:n,isNew:r,collectionName:i,fileName:o,currentValues:a}=e;if(!Tie())throw Lte({collectionName:i,fileName:o,currentValues:a}),new Error("validation_failed");const s=GN({draft:e}),{defaultLocaleSlug:l}=s,{savingEntry:u,changes:d,savingAssets:f}=await ZN({draft:e,slugs:s});let h;try{h=await ep({changes:d,savingEntries:[u],savingAssets:f,options:{commitType:r?"create":"update",collection:n,skipCI:t}})}catch(p){throw console.error(p.cause??p),new Error("saving_failed",{cause:p.cause??p})}return await aL({type:"postSave",draft:e,savingEntry:u}),$ie({skipCI:t}),wv(i,r?"":l),h.savedEntries[0]};var Cie=j("<!> <!>",1),Pie=j("<!> <!> <!>",1),Oie=j("<!> <!> <!> <!>",1),Lie=j('<!> <h2 role="none"><!></h2> <!> <!> <!> <!>',1),Iie=j('<div role="none" class="error svelte-zjrq31"> </div>'),Nie=j(" <!>",1),Rie=j("<!> <!> <!> <!> <!> <!>",1);const Mie={hash:"svelte-zjrq31",code:".error.svelte-zjrq31 {margin-top:8px;border-radius:var(--sui-control-medium-border-radius);padding:12px;background-color:var(--sui-secondary-background-color);font-size:var(--sui-font-size-default);line-height:1.5;}"};function Die(t,e){ae(e,!0),ke(t,Mie);const n=()=>H(Xe,"$entryDraft",p),r=()=>H(Bt,"$appLocale",p),i=()=>H(rR,"$entryDraftModified",p),o=()=>H(ht,"$prefs",p),a=()=>H(ce,"$_",p),s=()=>H(mn,"$isSmallScreen",p),l=()=>H(Ta,"$isMediumScreen",p),u=()=>H(go,"$entryEditorSettings",p),d=()=>H(p1,"$skipCIConfigured",p),f=()=>H(g1,"$skipCIEnabled",p),h=()=>H(_y,"$copyFromLocaleToast",p),[p,g]=ve(),m=Ce=>{const _e=_(()=>s()?vt:et);var fe=Cie(),be=M(fe);{let je=_(()=>a()("duplicate")),Re=_(()=>a()("duplicate_entry")),Ie=_(()=>c(C)||!!c(O)?.path||!Hm(c(P)));br(be,()=>c(_e),(Pe,$e)=>{$e(Pe,{variant:"ghost",get label(){return c(je)},get"aria-label"(){return c(Re)},get disabled(){return c(Ie)},onclick:()=>{Zt(`/collections/${c(K)}/new`,{replaceState:!0,notifyChange:!1,transitionType:"forwards"}),yie()}})})}var Oe=z(be,2);{let je=_(()=>a()("delete")),Re=_(()=>a()("delete_entry")),Ie=_(()=>c(O)?.delete===!1);br(Oe,()=>c(_e),(Pe,$e)=>{$e(Pe,{variant:"ghost",get label(){return c(je)},get"aria-label"(){return c(Re)},get disabled(){return c(Ie)},onclick:()=>{V(w,!0)}})})}S(Ce,fe)};let v=N(e,"disabled",3,!1),b=ie(!1),y=ie(!1),w=ie(!1),x=ie(!1),E=ie(""),$=ie(!1),A=ie(void 0);const k=_(()=>n()===void 0),T=_(()=>n()?.isNew??!0),C=_(()=>n()?.isIndexFile??!1),P=_(()=>n()?.collection),O=_(()=>c(P)?._type==="entry"?c(P):void 0),I=_(()=>n()?.collectionFile),L=_(()=>n()?.originalEntry),D=_(()=>(c(I)??c(P))?._i18n??Go),B=_(()=>c(D).defaultLocale),K=_(()=>c(P)?.name),G=_(()=>c(I)?.name),W=_(()=>r()&&c(P)?Za(c(P)):""),Y=_(()=>r()&&c(P)?Za(c(P),{useSingular:!0}):""),R=_(()=>n()?.canPreview??!0),q=_(()=>c(T)||i()),J=_(()=>Object.values(n()?.validities??{}).map(Ce=>Object.values(Ce).map(({valid:_e})=>!_e)).flat(1).filter(Boolean).length),Q=_(()=>c(K)&&c(L)&&da({collectionName:c(K),fileName:c(G)})?.entryRelative?_0({entry:c(L),collectionName:c(K),fileName:c(G),relative:!0}):[]),ee=_(()=>c(P)&&c(L)?KO(c(L),c(B),c(P),c(I)):void 0),re=()=>{qs(c(K)==="_singletons"?"/collections":`/collections/${c(K)}`)},te=async({skipCI:Ce=void 0}={})=>{if(V($,!0),!!c(P))try{const _e=await Aie({skipCI:Ce});o()?.closeOnSave??!0?(re(),Je(Xe,null)):(c(T)&&Zt(`/collections/${c(K)}/entries/${_e.subPath}`,{replaceState:!0,notifyChange:!1,transitionType:"backwards"}),hf({collection:c(P),collectionFile:c(I),originalEntry:_e,expanderStates:n()?.expanderStates}))}catch(_e){_e.message==="validation_failed"?V(b,!0):_e.message==="saving_failed"?(V(x,!0),V(E,_e.cause?.message??_e.message??a()("unexpected_error"),!0)):(V(x,!0),V(E,""),console.error(_e))}finally{V($,!1)}};var de=Rie(),he=M(de);{let Ce=_(()=>a()("primary"));io(he,{variant:"primary",get"aria-label"(){return c(Ce)},children:(_e,fe)=>{var be=Lie(),Oe=M(be);{let pe=_(()=>a()("cancel_editing"));oc(Oe,{get"aria-label"(){return c(pe)},get useShortcut(){return o().closeWithEscape},onclick:()=>{re()}})}var je=z(Oe,2),Re=F(je);{var Ie=pe=>{Ur(pe,{children:(Le,Ne)=>{var nt=X(),We=M(nt);{var Ze=_t=>{var Ft=Fe();Z(ln=>ne(Ft,ln),[()=>a()("create_entry_title",{values:{name:c(Y)}})]),S(_t,Ft)},st=_t=>{const Ft=_(()=>c(I)?Fh(c(I)):c(P)&&c(L)&&r()?ld(c(P),c(L)):"");var ln=X(),qt=M(ln);{var Et=wt=>{var Lt=Fe();Z(()=>ne(Lt,c(Ft))),S(wt,Lt)},Yt=wt=>{var Lt=Fe();Z(gr=>ne(Lt,gr),[()=>a()("edit_entry_title",{values:{collection:c(W),entry:c(Ft)}})]),S(wt,Lt)};U(qt,wt=>{s()?wt(Et):wt(Yt,!1)})}S(_t,ln)};U(We,_t=>{c(T)?_t(Ze):_t(st,!1)})}S(Le,nt)},$$slots:{default:!0}})};U(Re,pe=>{c(k)||pe(Ie)})}var Pe=z(je,2);{var $e=pe=>{{let Le=_(()=>a()("view_on_live_site"));et(pe,{variant:"tertiary",get label(){return c(Le)},onclick:()=>{window.open(c(ee))}})}};U(Pe,pe=>{!v()&&c(ee)&&pe($e)})}var Ee=z(Pe,2);{var qe=pe=>{m(pe)};U(Ee,pe=>{!s()&&!v()&&!c(I)&&!c(T)&&pe(qe)})}var Ke=z(Ee,2);{const pe=Ne=>{{let nt=_(()=>a()("editor_options"));xr(Ne,{get"aria-label"(){return c(nt)},children:(We,Ze)=>{var st=Oie(),_t=M(st);{var Ft=wt=>{m(wt)};U(_t,wt=>{s()&&!v()&&!c(I)&&!c(T)&&wt(Ft)})}var ln=z(_t,2);{let wt=_(()=>a()("edit_slug")),Lt=_(()=>!!c(I)||c(T)||c(C)||c(O)?.delete===!1);vt(ln,{get label(){return c(wt)},get disabled(){return c(Lt)},onclick:()=>{V(y,!0)}})}var qt=z(ln,2);{let wt=_(()=>a()("revert_all_changes")),Lt=_(()=>!c(q));vt(qt,{get label(){return c(wt)},get disabled(){return c(Lt)},onclick:()=>{L1()}})}var Et=z(qt,2);{var Yt=wt=>{var Lt=Pie(),gr=M(Lt);vi(gr,{});var vn=z(gr,2);{let kt=_(()=>a()("show_preview")),cn=_(()=>u()?.showPreview),ut=_(()=>!c(R));Lg(vn,{get label(){return c(kt)},get checked(){return c(cn)},get disabled(){return c(ut)},onChange:()=>{go.update((pt={})=>({...pt,showPreview:!pt.showPreview}))}})}var Xn=z(vn,2);{let kt=_(()=>a()("sync_scrolling")),cn=_(()=>u()?.syncScrolling),ut=_(()=>!c(R)&&Object.keys(n()?.currentValues??{}).length===1);Lg(Xn,{get label(){return c(kt)},get checked(){return c(cn)},get disabled(){return c(ut)},onChange:()=>{go.update((pt={})=>({...pt,syncScrolling:!pt.syncScrolling}))}})}S(wt,Lt)};U(Et,wt=>{s()||l()||wt(Yt)})}S(We,st)},$$slots:{default:!0}})}};let Le=_(()=>a()("show_editor_options"));St(ei(Ke,{get disabled(){return v()},variant:"ghost",iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return c(Le)},popup:pe,$$slots:{popup:!0}}),Ne=>V(A,Ne,!0),()=>c(A))}var lt=z(Ke,2);{var Te=pe=>{{const Le=We=>{xr(We,{children:(Ze,st)=>{{let _t=_(()=>a()(f()?"save_and_publish":"save_without_publishing"));vt(Ze,{get label(){return c(_t)},onclick:()=>{te({skipCI:!f()})}})}},$$slots:{default:!0}})};let Ne=_(()=>a()(c($)?"saving":"save")),nt=_(()=>v()||!c(q)||c($));hL(pe,{variant:"primary",get label(){return c(Ne)},get disabled(){return c(nt)},keyShortcuts:"Accel+S",onclick:()=>{te()},popup:Le,$$slots:{popup:!0}})}},Me=pe=>{{let Le=_(()=>a()(c($)?"saving":"save")),Ne=_(()=>v()||!c(q)||c($));et(pe,{variant:"primary",get label(){return c(Le)},get disabled(){return c(Ne)},keyShortcuts:"Accel+S",onclick:()=>{te()}})}};U(lt,pe=>{d()?pe(Te):pe(Me,!1)})}S(_e,be)},$$slots:{default:!0}})}var ue=z(he,2);nr(ue,{get show(){return c(b)},set show(Ce){V(b,Ce,!0)},children:(Ce,_e)=>{Hn(Ce,{status:"error",children:(fe,be)=>{var Oe=Fe();Z(je=>ne(Oe,je),[()=>a()(c(J)===1?"entry_validation_error":"entry_validation_errors",{values:{count:c(J)}})]),S(fe,Oe)},$$slots:{default:!0}})},$$slots:{default:!0}});var ge=z(ue,2);nr(ge,{get id(){return h().id},get show(){return h().show},set show(Ce){bt(_y,xe(h).show=Ce,xe(h))},children:(Ce,_e)=>{const fe=_(()=>{const{status:be,message:Oe,count:je,sourceLanguage:Re}=h();return{status:be,message:Oe,count:je,sourceLanguage:Re}});Hn(Ce,{get status(){return c(fe).status},children:(be,Oe)=>{var je=Fe();Z(Re=>ne(je,Re),[()=>a()(`editor.${c(fe).message}`,{values:{count:c(fe).count,source:c(fe).sourceLanguage?Uo(c(fe).sourceLanguage)??c(fe).sourceLanguage:""}})]),S(be,je)},$$slots:{default:!0}})},$$slots:{default:!0}});var ye=z(ge,2);gie(ye,{get open(){return c(y)},set open(Ce){V(y,Ce,!0)}});var me=z(ye,2);{let Ce=_(()=>a()("delete_entry")),_e=_(()=>a()("delete"));md(me,{get title(){return c(Ce)},get okLabel(){return c(_e)},onOk:async()=>{c(L)&&await QR([c(L)],c(Q)),re()},onClose:()=>{c(A)?.focus()},get open(){return c(w)},set open(fe){V(w,fe,!0)},children:(fe,be)=>{var Oe=Fe();Z(je=>ne(Oe,je),[()=>a()(c(Q).length?"confirm_deleting_this_entry_with_assets":"confirm_deleting_this_entry")]),S(fe,Oe)},$$slots:{default:!0}})}var Ae=z(me,2);{let Ce=_(()=>a()("saving_entry.error.title"));Zm(Ae,{get title(){return c(Ce)},onClose:()=>{c(A)?.focus()},get open(){return c(x)},set open(_e){V(x,_e,!0)},children:(_e,fe)=>{var be=Nie(),Oe=M(be),je=z(Oe);{var Re=Ie=>{var Pe=Iie(),$e=F(Pe);Z(()=>ne($e,c(E))),S(Ie,Pe)};U(je,Ie=>{c(E)&&Ie(Re)})}Z(Ie=>ne(Oe,`${Ie??""} `),[()=>a()("saving_entry.error.description")]),S(_e,be)},$$slots:{default:!0}})}S(t,de),se(),g()}var Fie=j('<div role="none"><!></div> <div role="none"><!></div>',1),zie=j("<!> <!>",1),jie=j("<!> <!>",1),Uie=j("<!> <!>",1),Bie=j('<div role="none" class="cols svelte-jrunrx"><!></div>'),qie=j("<!> <!>",1),Hie=j('<div role="group" class="wrapper content-editor svelte-jrunrx"><!></div> <!> <!>',1);const Kie={hash:"svelte-jrunrx",code:`.wrapper.svelte-jrunrx {position:fixed;inset:0;z-index:100;display:flex;flex-direction:column;background-color:var(--sui-secondary-background-color);transition:filter 250ms;}.wrapper[hidden].svelte-jrunrx {display:none;}.wrapper[inert].svelte-jrunrx {filter:opacity(0);}.wrapper.svelte-jrunrx .cols:where(.svelte-jrunrx) {flex:auto;overflow:hidden;display:flex;gap:4px;background-color:var(--sui-secondary-background-color);}.wrapper.svelte-jrunrx .cols:where(.svelte-jrunrx) > div {display:flex;flex-direction:column;min-width:480px;background-color:var(--sui-primary-background-color);transition:all 500ms;}.wrapper.svelte-jrunrx .cols:where(.svelte-jrunrx) > div[data-mode=edit] {flex:1 1;}.wrapper.svelte-jrunrx .cols:where(.svelte-jrunrx) > div[data-mode=preview] {flex:2 1;}
|
|
693
692
|
@media (width < 768px) {.wrapper.svelte-jrunrx .cols:where(.svelte-jrunrx) > div {min-width:auto;}
|
|
694
693
|
}`};function Vie(t,e){ae(e,!0),ke(t,Kie);const n=()=>H(Xe,"$entryDraft",f),r=()=>H(go,"$entryEditorSettings",f),i=()=>H(ol,"$editorFirstPane",f),o=()=>H(Jo,"$editorSecondPane",f),a=()=>H(mn,"$isSmallScreen",f),s=()=>H(Ta,"$isMediumScreen",f),l=()=>H(vc,"$showContentOverlay",f),u=()=>H(ce,"$_",f),d=()=>H(vy,"$showDuplicateToast",f),[f,h]=ve();let p=!1,g=ie(!0),m=ie(void 0),v=ie(void 0),b=ie(void 0);const y=_(()=>n()===void 0),w=_(()=>n()?.isNew??!0),x=_(()=>n()?.collection),E=_(()=>c(x)?._type==="entry"?c(x):void 0),$=_(()=>n()?.collectionFile),A=_(()=>r()??{}),k=_(()=>c(A).showPreview),T=_(()=>(c($)??c(x))?._i18n??Go),C=_(()=>c(T).i18nEnabled),P=_(()=>c(T).allLocales),O=_(()=>c(T).defaultLocale),I=_(()=>n()?.canPreview??!0),L=_(()=>c($)?.name?[c(x)?.name,c($).name].join("|"):c(x)?.name),D=_(()=>c(E)?.create??!1),B=_(()=>c(E)?.limit??1/0),K=_(()=>!Hm(c(x))),G=async()=>{const[te,de]=r()?.paneStates?.[c(L)??""]??[];return p||!te||!de||te.locale&&!c(P).includes(te.locale)||de.locale&&!c(P).includes(de.locale)||(!c(k)||!c(I))&&(te.mode==="preview"||de.mode==="preview")?!1:(p=!0,await El(),Je(ol,te),Je(Jo,de),await El(),p=!1,(a()||s())&&Je(Jo,null),!0)},W=async()=>{if(n()&&!await G())if(Je(ol,{mode:"edit",locale:i()?.locale??c(O)}),a()||s())Je(Jo,null);else if(!c(k)||!c(I)){const te=c(C)?c(P).filter(de=>de!==i()?.locale):[];Je(Jo,te.length?{mode:"edit",locale:te[0]}:null)}else Je(Jo,{mode:"preview",locale:i().locale})},Y=()=>{!c(x)||p||!i()||!o()||!c(L)||go.update((te={})=>({...te,paneStates:{...te.paneStates,[c(L)]:[i(),o()]}}))},R=async()=>{await El(),c(m)&&(c(m).tabIndex=0,c(m).focus())};Vt(()=>{c(m)?.addEventListener("transitionend",()=>{l()||(V(g,!0),Je(Xe,null))})}),ze(()=>{c(L)&&(Je(ol,null),Je(Jo,null))}),ze(()=>{c(k),c(I),a(),s(),xe(()=>{W()})}),ze(()=>{i(),o(),Y()}),ze(()=>{c(m)&&(l()?c(g)&&(V(g,!1),W(),R(),WX()):GX())});var q=Hie(),J=M(q),Q=F(J);fr(Q,()=>n()?.id,te=>{var de=qie(),he=M(de);{let me=_(()=>c(w)&&c(K));Die(he,{get disabled(){return c(me)}})}var ue=z(he,2);{var ge=me=>{},ye=me=>{var Ae=X(),Ce=M(Ae);{var _e=be=>{cr(be,{children:(Oe,je)=>{var Re=Fie(),Ie=M(Re),Pe=F(Ie);{var $e=lt=>{var Te=Fe();Z(Me=>ne(Te,Me),[()=>u()("entry_not_found")]),S(lt,Te)},Ee=lt=>{var Te=X(),Me=M(Te);{var pe=Ne=>{var nt=Fe();Z(We=>ne(nt,We),[()=>u()("creating_entries_disabled_by_admin")]),S(Ne,nt)},Le=Ne=>{var nt=Fe();Z(We=>ne(nt,We),[()=>u()("creating_entries_disabled_by_limit",{values:{limit:c(B)}})]),S(Ne,nt)};U(Me,Ne=>{c(D)?Ne(Le,!1):Ne(pe)},!0)}S(lt,Te)};U(Pe,lt=>{c(y)?lt($e):lt(Ee,!1)})}var qe=z(Ie,2),Ke=F(qe);et(Ke,{variant:"primary",onclick:()=>{Zt(`/collection/${c(x)?.name}`,{replaceState:!0,transitionType:"backwards"})},children:(lt,Te)=>{var Me=Fe();Z(pe=>ne(Me,pe),[()=>u()("back_to_collection")]),S(lt,Me)},$$slots:{default:!0}}),S(Oe,Re)},$$slots:{default:!0}})},fe=be=>{var Oe=Bie(),je=F(Oe);{var Re=Ie=>{var Pe=Uie(),$e=M(Pe);{var Ee=lt=>{const Te=_(()=>{const{locale:Me,mode:pe}=i()??{};return{locale:Me,mode:pe}});{let Me=_(()=>u()(c(Te).mode==="edit"?"edit_x_locale":"preview_x_locale",{values:{locale:Uo(c(Te).locale)??c(Te).locale}}));ma(lt,{class:"pane",get"aria-label"(){return c(Me)},get"data-locale"(){return c(Te).locale},get"data-mode"(){return c(Te).mode},children:(pe,Le)=>{var Ne=zie(),nt=M(Ne);z$(nt,{id:"first-pane-header",get thisPane(){return ol},get thatPane(){return Jo}});var We=z(nt,2);D$(We,{id:"first-pane-body",get thisPane(){return ol},get thisPaneContentArea(){return c(v)},set thisPaneContentArea(Ze){V(v,Ze,!0)},get thatPaneContentArea(){return c(b)},set thatPaneContentArea(Ze){V(b,Ze,!0)}}),S(pe,Ne)},$$slots:{default:!0}})}};U($e,lt=>{i()&<(Ee)})}var qe=z($e,2);{var Ke=lt=>{const Te=_(()=>{const{locale:Me,mode:pe}=o()??{};return{locale:Me,mode:pe}});{let Me=_(()=>u()(c(Te).mode==="edit"?"edit_x_locale":"preview_x_locale",{values:{locale:Uo(c(Te).locale)??c(Te).locale}}));ma(lt,{get"aria-label"(){return c(Me)},get"data-locale"(){return c(Te).locale},get"data-mode"(){return c(Te).mode},children:(pe,Le)=>{var Ne=jie(),nt=M(Ne);z$(nt,{id:"second-pane-header",get thisPane(){return Jo},get thatPane(){return ol}});var We=z(nt,2);D$(We,{id:"second-pane-body",get thisPane(){return Jo},get thisPaneContentArea(){return c(b)},set thisPaneContentArea(Ze){V(b,Ze,!0)},get thatPaneContentArea(){return c(v)},set thatPaneContentArea(Ze){V(v,Ze,!0)}}),S(pe,Ne)},$$slots:{default:!0}})}};U(qe,lt=>{o()&<(Ke)})}S(Ie,Pe)};U(je,Ie=>{c(x)&&Ie(Re)})}S(be,Oe)};U(Ce,be=>{c(y)||c(w)&&c(K)?be(_e):be(fe,!1)},!0)}S(me,Ae)};U(ue,me=>{n()===null?me(ge):me(ye,!1)})}S(te,de)}),St(J,te=>V(m,te),()=>c(m));var ee=z(J,2);JX(ee,{});var re=z(ee,2);nr(re,{get show(){return Ew(),d()},set show(te){Je(vy,te)},children:(te,de)=>{Hn(te,{status:"success",children:(he,ue)=>{var ge=Fe();Z(ye=>ne(ge,ye),[()=>u()("entry_duplicated")]),S(he,ge)},$$slots:{default:!0}})},$$slots:{default:!0}}),Z(te=>{Se(J,"hidden",c(g)),J.inert=!l(),Se(J,"aria-label",te)},[()=>u()("content_editor")]),S(t,q),se(),h()}const tM=t=>{if(Array.isArray(t))return{options:t};if($t(t)){const{filters:e,default:n}=t;if(Array.isArray(e)){const r=n?e.find(({name:i})=>i===n):void 0;return{options:e,default:r?{field:r.field,pattern:r.pattern}:void 0}}}return{options:[]}},Gie=(t,e,n)=>{const{name:r,view_filters:i=[],_i18n:{defaultLocale:o}}=e,{options:a}=tM(i),s=n.filter(({field:l,pattern:u})=>l!==void 0&&u!==void 0&&a.some(d=>d.field===l&&String(d.pattern)===String(u)));return t.filter(l=>s.every(({field:u,pattern:d})=>{const f={entry:l,locale:o,collectionName:r,key:u},h=Yf({...f,resolveRef:!1}),p=Yf({...f}),g=fd(d);return h===void 0||p===void 0?!1:g?g.test(String(h))||g.test(String(p)):h===d||p===d}))},Wie=(t,e)=>{if(!t||!("folder"in t)){e([]);return}const{options:n,default:r}=tM(t.view_filters);e(n),ci.update(i=>({...i,filters:i.filters??(r?[r]:void 0)}))},Yie=sn([tr],([t],e)=>{Wie(t,e)}),Jie=t=>{if(Array.isArray(t))return{options:t};if($t(t)){const{groups:e,default:n}=t;if(Array.isArray(e)){const r=n?e.find(({name:i})=>i===n):void 0;return{options:e,default:r?{field:r.field,pattern:r.pattern}:void 0}}}return{options:[]}},Xie=(t,e,n)=>{const{field:r,pattern:i}=n??{field:"",pattern:void 0};if(!r)return t.length?[{name:"*",entries:t}]:[];const{name:o,_i18n:{defaultLocale:a}}=e,s=oe(ci).sort,l=fd(i),u={},d=oe(ce)("other");t.forEach(h=>{const p=Yf({entry:h,locale:a,collectionName:o,key:r}),g=p===void 0?d:l?String(p).match(l)?.[0]??d:String(p);g in u||(u[g]=[]),u[g].push(h)});const f=Object.entries(u).map(([h,p])=>({name:h,entries:p})).sort(({name:h},{name:p})=>eo(h,p));return s?.key===r&&s.order==="descending"&&f.reverse(),f},Zie=(t,e)=>{if(!t||!("folder"in t)){e([]);return}const{options:n,default:r}=Jie(t.view_groups);e(n),ci.update(i=>({...i,group:i.group===void 0?r:i.group}))},Qie=sn([tr],([t],e)=>{Zie(t,e)}),eu=it(),eoe=async({repository:t})=>{const{databaseName:e}=t??{},n=e?new jo(e,"ui-settings"):null,r="contents-view";eu.set(await n?.get(r)??{}),eu.subscribe(i=>{(async()=>{try{fn(i,await n?.get(r))||await n?.set(r,i)}catch{}})()}),ci.subscribe(i=>{const{name:o}=oe(tr)??{},a=oe(eu)?.[o??""]??{};o&&!fn(i,a)&&eu.update(s=>({...s,[o]:i}))})};Cn.subscribe(t=>{t&&!oe(eu)&&eoe(t)});const B$=["title","name","date","author","description"],fw={slug:String,commit_author:String,commit_date:Date},nM=Object.keys(fw),q$=t=>Array.isArray(t)&&t.every(e=>typeof e=="string"),toe=t=>{if(q$(t))return{keys:t};if($t(t)){const{fields:e,default:n}=t;return q$(e)?$t(n)?{keys:e,defaultKey:n.field,defaultOrder:["descending","Descending"].includes(n.direction??"")?"descending":"ascending"}:{keys:e}:{keys:[]}}return{keys:[]}},noe=t=>{if(t){const e=B$.filter(n=>n!==t);return{keys:[t,...e],defaultKey:t}}return{keys:[...B$]}},roe=({collection:t,isCommitAuthorAvailable:e,isCommitDateAvailable:n})=>{const{name:r,identifier_field:i,sortable_fields:o}=t;let{keys:a,defaultKey:s,defaultOrder:l}=o?toe(o):noe(i);const u=a.includes("commit_author"),d=a.includes("commit_date");return e?!a.includes("author")&&!u&&a.push("commit_author"):u&&(a=a.filter(f=>f!=="commit_author")),n?!a.includes("date")&&!d&&a.push("commit_date"):d&&(a=a.filter(f=>f!=="commit_date")),a=$u(a).filter(f=>!!f&&(nM.includes(f)||!!gn({collectionName:r,keyPath:f}))),s=s&&a.includes(s)?s:a[0],l??=s?"ascending":void 0,{keys:a,default:{key:s,order:l}}},ioe=({key:t,fieldConfig:e})=>{if(t in fw)return fw[t];if(e?.widget==="boolean")return Boolean;if(e?.widget==="number"){const{value_type:n="int"}=e;if(n==="int"||n==="float")return Number}return String},ooe=({collection:t,key:e})=>[...nM,"name"].includes(e)?oe(ce)(`sort_keys.${e}`):e.includes(".")?e.split(".").map((n,r,i)=>{if(/^\d+$/.test(n))return;const o=i.slice(0,r+1).join(".");return gn({collectionName:t.name,keyPath:o})?.label||n}).filter(Boolean).join(" – "):t.fields?.find(({name:n})=>n===e)?.label||e,aoe=sn([tr,to,Bt],([t,e],n)=>{if(!t||!("folder"in t)){n([]);return}const r=oe(eu)?.[t.name]??{type:"list"},{keys:i,default:o}=roe({collection:t,isCommitAuthorAvailable:e.some(a=>!!a.commitAuthor),isCommitDateAvailable:e.some(a=>!!a.commitDate)});r.sort??=o,n(i.map(a=>({key:a,label:ooe({collection:t,key:a})}))),fn(r,oe(ci))||ci.set(r)}),H$=t=>{let e=t,n=!0;for(;n;){const r=e;e=e.replaceAll(/([_*`~])([^_*`~]+)\1/g,"$2"),e=e.replaceAll(/([_*`~]{2,})(.+?)\1/g,"$2"),n=e!==r}return e},soe=["title","summary","description"],loe=(t,e,{key:n,order:r}={})=>{const i=[...t];if(n===void 0)return i;const{name:o,_i18n:{defaultLocale:a}}=e,s=gn({collectionName:o,keyPath:n}),l=ioe({key:n,fieldConfig:s}),u=Object.fromEntries(i.map(p=>[p.slug,Yf({entry:p,locale:a,collectionName:o,key:n})])),d=s?.widget==="datetime"?s:void 0,f=s?.widget==="markdown"||soe.includes(n);i.sort((p,g)=>{const m=u[p.slug],v=u[g.slug];if(d){const b=m?Pu(m,d):void 0,y=v?Pu(v,d):void 0;return Number(b??0)-Number(y??0)}if(l===String){const b=m?String(m):"",y=v?String(v):"";return f?eo(H$(b),H$(y)):eo(b,y)}return Number(m??0)-Number(v??0)}),r==="descending"&&i.reverse();const h=Mi(e)?.name;if(h){const p=i.findIndex(g=>g.slug===h);p>-1&&i.unshift(i.splice(p,1)[0])}return i},ci=it({type:"list"}),rl=sn([to,tr],([t,e],n)=>{n(t&&e?Sa(e.name):[])});let K$="";const I1=sn([rl,ci,Bt],([t,e],n)=>{const r=JSON.stringify({_listedEntries:t,_currentView:e});if(r===K$)return;K$=r,n([]);const i=oe(tr);let o=[...t];if(!o.length||Zs(i,o[0]).length)return;e.sort&&(o=loe(o,i,e.sort)),e.filters&&(o=Gie(o,i,e.filters));const a=Xie(o,i,e.group);fn(oe(I1),a)||n(a)});rl.subscribe(t=>{Lu.set([]),oe(ht).devModeEnabled&&console.info("listedEntries",t)});tr.subscribe(t=>{t&&oe(ht).devModeEnabled&&console.info("selectedCollection",t)});var coe=j("<!> <!>",1),uoe=j('<div role="none" class="label svelte-cy8v6x"><!></div>'),doe=j("<!> <!> <!>",1);const foe={hash:"svelte-cy8v6x",code:".label.svelte-cy8v6x .icon.home {opacity:0.5;font-size:20px;vertical-align:-4px;}"};function hoe(t,e){ae(e,!0),ke(t,foe);const n=()=>H(rl,"$listedEntries",s),r=()=>H(mn,"$isSmallScreen",s),i=()=>H(Ta,"$isMediumScreen",s),o=()=>H(Lu,"$selectedEntries",s),a=()=>H(Bt,"$appLocale",s),[s,l]=ve(),u=d=>{Lu.update(f=>{const h=f.indexOf(e.entry);return d&&h===-1&&f.push(e.entry),!d&&h>-1&&f.splice(h,1),f})};{let d=_(()=>n().indexOf(e.entry));qh(t,{get"aria-rowindex"(){return c(d)},onChange:f=>{u(f.detail.selected)},onclick:()=>{Zt(`/collections/${e.collection.name}/entries/${e.entry.subPath}`,{transitionType:"forwards"})},children:(f,h)=>{var p=doe(),g=M(p);{var m=w=>{Wi(w,{class:"checkbox",children:(x,E)=>{{let $=_(()=>o().includes(e.entry));Bh(x,{role:"none",tabindex:"-1",get checked(){return c($)},onChange:({detail:{checked:A}})=>{u(A)}})}},$$slots:{default:!0}})};U(g,w=>{r()||i()||w(m)})}var v=z(g,2);{var b=w=>{Wi(w,{class:"image",children:(x,E)=>{var $=X(),A=M($);En(A,()=>iL(e.collection,e.entry),null,(k,T)=>{var C=X(),P=M(C);{var O=I=>{{let L=_(()=>e.viewType==="list"?"icon":"tile");bv(I,{get src(){return c(T)},get variant(){return c(L)},cover:!0})}};U(P,I=>{c(T)&&I(O)})}S(k,C)}),S(x,$)},$$slots:{default:!0}})};U(v,w=>{e.collection._thumbnailFieldNames.length&&w(b)})}var y=z(v,2);Wi(y,{class:"title",children:(w,x)=>{var E=uoe(),$=F(E);Ur($,{lines:2,children:(A,k)=>{var T=coe(),C=M(T);fr(C,a,I=>{var L=X(),D=M(L);_r(D,()=>ld(e.collection,e.entry,{useTemplate:!0,allowMarkdown:!0})),S(I,L)});var P=z(C,2);{var O=I=>{{let L=_(()=>Mi(e.collection)?.icon);Qe(I,{get name(){return c(L)},class:"home"})}};U(P,I=>{Ea(e.collection,e.entry)&&I(O)})}S(A,T)},$$slots:{default:!0}}),S(w,E)},$$slots:{default:!0}}),S(f,p)},$$slots:{default:!0}})}se(),l()}var poe=j("<!> <!>",1);function rM(t,e){ae(e,!0);const n=()=>H(tr,"$selectedCollection",a),r=()=>H(to,"$allEntries",a),i=()=>H(Bt,"$appLocale",a),o=()=>H(ce,"$_",a),[a,s]=ve();let l=N(e,"label",3,void 0),u=N(e,"keyShortcuts",3,void 0);const d=_(()=>!Hm(n())),f=_(()=>r()&&n()?_4(n()):!1),h=_(()=>i()&&n()?Mi(n())?.label:""),p=_(()=>c(f)?hL:et),g=(b=!1)=>{Zt(`/collections/${e.collectionName}/new`,{state:{index:b},transitionType:"forwards"})};var m=X(),v=M(m);{const b=E=>{Qe(E,{name:"edit"})},y=E=>{var $=X(),A=M($);{var k=T=>{xr(T,{children:(C,P)=>{var O=poe(),I=M(O);{let D=_(()=>o()("entry"));vt(I,{get label(){return c(D)},onclick:()=>g()})}var L=z(I,2);vt(L,{get label(){return c(h)},onclick:()=>g(!0)}),S(C,O)},$$slots:{default:!0}})};U(A,T=>{c(f)&&T(k)})}S(E,$)};let w=_(()=>!l()),x=_(()=>o()("create_new_entry"));br(v,()=>c(p),(E,$)=>{$(E,{variant:"primary",get iconic(){return c(w)},get disabled(){return c(d)},get label(){return l()},get"aria-label"(){return c(x)},get keyShortcuts(){return u()},onclick:()=>g(),startIcon:b,popup:y,$$slots:{startIcon:!0,popup:!0}})})}S(t,m),se(),s()}var goe=j('<span role="none"> </span>'),moe=j('<span role="none"> </span> <!>',1),voe=j('<span role="none"> </span>');function _oe(t,e){ae(e,!0);const n=()=>H(tr,"$selectedCollection",s),r=()=>H(ci,"$currentView",s),i=()=>H(I1,"$entryGroups",s),o=()=>H(ce,"$_",s),a=()=>H(rl,"$listedEntries",s),[s,l]=ve(),u=_(n),d=_(()=>r().type),f=_(()=>i().map(({entries:h})=>h).flat(1));{let h=_(()=>o()("entry_list"));v1(t,{get"aria-label"(){return c(h)},children:(p,g)=>{var m=X(),v=M(m);{var b=w=>{var x=X(),E=M(x);{var $=k=>{const T=_(()=>{const{defaultLocale:C}=c(u)._i18n;return{defaultLocale:C}});{let C=_(()=>o()("entries"));tp(k,{get viewType(){return c(d)},id:"entry-list",get"aria-label"(){return c(C)},get"aria-rowcount"(){return a().length},children:(P,O)=>{var I=X(),L=M(I);rt(L,1,i,({name:D,entries:B})=>D,(D,B)=>{let K=()=>c(B).name,G=()=>c(B).entries;var W=X(),Y=M(W);En(Y,Rt,null,R=>{{let q=_(()=>K()!=="*"?K():void 0);gL(R,{get label(){return c(q)},children:(J,Q)=>{{const ee=(te,de=He)=>{var he=X(),ue=M(he);En(ue,Rt,null,ge=>{hoe(ge,{get collection(){return c(u)},get entry(){return de()},get viewType(){return c(d)}})}),S(te,he)};let re=_(()=>G().filter(({locales:te})=>!!(te[c(T).defaultLocale]??Object.values(te)[0])?.content));_c(J,{get items(){return c(re)},itemKey:"id",renderItem:ee,$$slots:{renderItem:!0}})}},$$slots:{default:!0}})}}),S(D,W)}),S(P,I)},$$slots:{default:!0}})}},A=k=>{var T=X(),C=M(T);{var P=I=>{cr(I,{children:(L,D)=>{var B=goe(),K=F(B);Z(G=>ne(K,G),[()=>o()("no_entries_found")]),S(L,B)},$$slots:{default:!0}})},O=I=>{cr(I,{children:(L,D)=>{var B=moe(),K=M(B),G=F(K),W=z(K,2);{let Y=_(()=>o()("create_new_entry"));rM(W,{get collectionName(){return c(u).name},get label(){return c(Y)}})}Z(Y=>ne(G,Y),[()=>o()("no_entries_created")]),S(L,B)},$$slots:{default:!0}})};U(C,I=>{a().length?I(P):I(O,!1)},!0)}S(k,T)};U(E,k=>{c(f).length?k($):k(A,!1)})}S(w,x)},y=w=>{cr(w,{children:(x,E)=>{var $=voe(),A=F($);Z(k=>ne(A,k),[()=>o()("collection_not_found")]),S(x,$)},$$slots:{default:!0}})};U(v,w=>{c(u)?w(b):w(y,!1)})}S(p,m)},$$slots:{default:!0}})}se(),l()}var boe=j('<div role="none" class="label svelte-1nfjp1"><!> <!></div>'),yoe=j('<span role="none"> </span>');const woe={hash:"svelte-1nfjp1",code:".label.svelte-1nfjp1 {display:flex;align-items:center;gap:16px;}.label.svelte-1nfjp1 .icon {display:flex;align-items:center;justify-content:center;border-radius:var(--sui-control-medium-border-radius);width:var(--icon-size);height:var(--icon-size);background-color:var(--sui-secondary-background-color);}"};function xoe(t,e){ae(e,!0),ke(t,woe);const n=()=>H(tr,"$selectedCollection",i),r=()=>H(ce,"$_",i),[i,o]=ve(),a=_(()=>n()?.files.filter(Gm)??[]);{let s=_(()=>r()("file_list"));v1(t,{get"aria-label"(){return c(s)},children:(l,u)=>{var d=X(),f=M(d);{var h=g=>{{let m=_(()=>r()("files"));tp(g,{viewType:"list",get"aria-label"(){return c(m)},get"aria-rowcount"(){return c(a).length},children:(v,b)=>{_c(v,{get items(){return c(a)},itemKey:"name",renderItem:(w,x)=>{let E=()=>x?.().name,$=()=>x?.().label,A=()=>x?.().icon;var k=X(),T=M(k);En(T,Rt,null,C=>{qh(C,{onclick:()=>{Zt(`/collections/${n()?.name}/entries/${E()}`,{transitionType:"forwards"})},children:(P,O)=>{Wi(P,{class:"title",children:(I,L)=>{var D=boe(),B=F(D);{var K=W=>{Qe(W,{get name(){return A()}})};U(B,W=>{A()&&W(K)})}var G=z(B,2);Ur(G,{lines:2,children:(W,Y)=>{var R=Fe();Z(()=>ne(R,$()||E())),S(W,R)},$$slots:{default:!0}}),S(I,D)},$$slots:{default:!0}})},$$slots:{default:!0}})}),S(w,k)},$$slots:{renderItem:!0}})},$$slots:{default:!0}})}},p=g=>{cr(g,{children:(m,v)=>{var b=yoe(),y=F(b);Z(w=>ne(y,w),[()=>r()("no_files_in_collection")]),S(m,b)},$$slots:{default:!0}})};U(f,g=>{c(a)?.length?g(h):g(p,!1)})}S(l,d)},$$slots:{default:!0}})}se(),o()}var koe=j('<div class="wrapper svelte-w0jevb"><!></div>');const Soe={hash:"svelte-w0jevb",code:".wrapper.svelte-w0jevb {display:contents;}"};function Eoe(t,e){ae(e,!0),ke(t,Soe);const n=()=>H(ce,"$_",r),[r,i]=ve(),o=_(()=>e.file.name),a=_(()=>e.file.label),s=_(()=>e.file.icon);let l=ie(!1),u=ie(void 0);var d=koe(),f=F(d);{const h=g=>{{let m=_(()=>c(s)||"edit_document");Qe(g,{get name(){return c(m)}})}};let p=_(()=>c(a)||c(o));Mr(f,{get label(){return c(p)},onSelect:()=>{Je(Ai,n()("singleton_selected_announcement",{values:{file:c(a)||c(o)}}))},onclick:()=>{Zt(`/collections/_singletons/entries/${c(o)}`,{transitionType:"forwards"}),V(l,!1),c(u)?.querySelector('[role="option"]')?.classList.remove("focused")},get selected(){return c(l)},set selected(g){V(l,g,!0)},startIcon:h,$$slots:{startIcon:!0}})}St(d,h=>V(u,h),()=>c(u)),S(t,d),se(),i()}var Toe=j("<!> <!>",1);function iM(t,e){ae(e,!0);const n=()=>H(ht,"$prefs",l),r=()=>H(Cn,"$backend",l),i=()=>H(Pg,"$isLastCommitPublished",l),o=()=>H(p1,"$skipCIConfigured",l),a=()=>H(mn,"$isSmallScreen",l),s=()=>H(ce,"$_",l),[l,u]=ve(),d=_(()=>n().deployHookURL),f=_(()=>n().deployHookAuthHeader),h=_(()=>r()?.triggerDeployment),p=_(()=>(!!c(d)||typeof c(h)=="function")&&!i());let g=ie("info"),m=ie(!1);const v=async()=>{V(g,"info"),V(m,!0);try{const{ok:x,status:E}=c(d)?await fetch(c(d),{method:"POST",mode:c(f)?"cors":"no-cors",headers:c(f)?{Authorization:c(f)}:{}}):await c(h)?.()??{};if(!x&&(c(f)||E!==0))throw new Error(`Webhook returned ${E} error`);Je(Pg,!0)}catch(x){V(g,"error"),V(m,!0),console.error(x)}};var b=X(),y=M(b);{var w=x=>{var E=Toe(),$=M(E);{let k=_(()=>a()?"small":"medium"),T=_(()=>s()("publish_changes")),C=_(()=>!c(p));et($,{variant:"secondary",get size(){return c(k)},get label(){return c(T)},get disabled(){return c(C)},onclick:()=>v()})}var A=z($,2);nr(A,{get show(){return c(m)},set show(k){V(m,k,!0)},children:(k,T)=>{Hn(k,{get status(){return c(g)},children:(C,P)=>{var O=Fe();Z(I=>ne(O,I),[()=>s()(c(g)==="error"?"publishing_changes_failed":"publishing_changes")]),S(C,O)},$$slots:{default:!0}})},$$slots:{default:!0}}),S(x,E)};U(y,x=>{o()&&x(w)})}S(t,b),se(),u()}var $oe=j("<header><h2> </h2> <!></header> <!>",1),Aoe=j('<span class="count"> </span>'),Coe=j('<span class="count"> </span>'),Poe=j("<!> <!>",1),Ooe=j('<div role="none" class="primary-sidebar"><!> <!></div>');function Loe(t,e){ae(e,!0);const n=()=>H(Bt,"$appLocale",l),r=()=>H(Pt,"$cmsConfig",l),i=()=>H(mn,"$isSmallScreen",l),o=()=>H(ce,"$_",l),a=()=>H(tr,"$selectedCollection",l),s=()=>H(to,"$allEntries",l),[l,u]=ve(),d=_(()=>Intl.NumberFormat(n()??void 0)),f=_(()=>r()?.collections?.filter(({hide:b})=>!b)??[]),h=_(()=>r()?.singletons??[]);var p=Ooe(),g=F(p);{var m=b=>{var y=$oe(),w=M(y),x=F(w),E=F(x),$=z(x,2);iM($,{});var A=z(w,2);yv(A,{onclick:k=>{k.preventDefault(),Zt("/search")}}),Z(k=>ne(E,k),[()=>o()("contents")]),S(b,y)};U(g,b=>{i()&&b(m)})}var v=z(g,2);{let b=_(()=>o()("collection_list"));vd(v,{get"aria-label"(){return c(b)},"aria-controls":"collection-container",children:(y,w)=>{var x=Poe(),E=M(x);{var $=T=>{{let C=_(()=>o()("collections"));Tl(T,{get label(){return c(C)},children:(P,O)=>{var I=X(),L=M(I);rt(L,19,()=>c(f),(D,B)=>D.name??B,(D,B)=>{var K=X(),G=M(K);En(G,Rt,null,W=>{var Y=X(),R=M(Y);{var q=Q=>{const ee=_(()=>{const{name:re,label:te,icon:de}=c(B);return{name:re,label:te,icon:de}});{const re=ue=>{{let ge=_(()=>c(ee).icon||"bookmark_manager");Qe(ue,{get name(){return c(ge)}})}},te=ue=>{var ge=X(),ye=M(ge);fr(ye,s,me=>{const Ae=_(()=>("files"in c(B)?c(B).files:Sa(c(ee).name)).length);var Ce=Aoe(),_e=F(Ce);Z((fe,be)=>{Se(Ce,"aria-label",`(${fe??""})`),ne(_e,be)},[()=>o()(c(Ae)>1?"many_entries":c(Ae)===1?"one_entry":"no_entries",{values:{count:c(Ae)}}),()=>c(d).format(c(Ae))]),S(me,Ce)}),S(ue,ge)};let de=_(()=>c(ee).label||c(ee).name),he=_(()=>i()?!1:a()?.name===c(ee).name);Mr(Q,{get label(){return c(de)},get selected(){return c(he)},onSelect:()=>{Zt(`/collections/${c(ee).name}`,{transitionType:"forwards"})},startIcon:re,endIcon:te,$$slots:{startIcon:!0,endIcon:!0}})}},J=Q=>{var ee=X(),re=M(ee);{var te=de=>{vi(de,{})};U(re,de=>{c(B).divider&&de(te)},!0)}S(Q,ee)};U(R,Q=>{"divider"in c(B)?Q(J,!1):Q(q)})}S(W,Y)}),S(D,K)}),S(P,I)},$$slots:{default:!0}})}};U(E,T=>{c(f).length&&T($)})}var A=z(E,2);{var k=T=>{var C=X(),P=M(C);{var O=L=>{{let D=_(()=>o()("files"));Tl(L,{get label(){return c(D)},children:(B,K)=>{var G=X(),W=M(G);rt(W,19,()=>c(h),(Y,R)=>Y.name??R,(Y,R)=>{var q=X(),J=M(q);En(J,Rt,null,Q=>{var ee=X(),re=M(ee);{var te=he=>{Eoe(he,{get file(){return c(R)}})},de=he=>{var ue=X(),ge=M(ue);{var ye=me=>{vi(me,{})};U(ge,me=>{c(R).divider&&me(ye)},!0)}S(he,ue)};U(re,he=>{"divider"in c(R)?he(de,!1):he(te)})}S(Q,ee)}),S(Y,q)}),S(B,G)},$$slots:{default:!0}})}},I=L=>{const D=_(()=>c(h).length);{let B=_(()=>o()("collections"));Tl(L,{get label(){return c(B)},children:(K,G)=>{{const W=J=>{Qe(J,{name:"bookmark_manager"})},Y=J=>{var Q=Coe(),ee=F(Q);Z((re,te)=>{Se(Q,"aria-label",`(${re??""})`),ne(ee,te)},[()=>o()(c(D)>1?"many_entries":c(D)===1?"one_entry":"no_entries",{values:{count:c(D)}}),()=>c(d).format(c(D))]),S(J,Q)};let R=_(()=>o()("files")),q=_(()=>a()?.name==="_singletons");Mr(K,{get label(){return c(R)},get selected(){return c(q)},onSelect:()=>{Zt("/collections/_singletons",{transitionType:"forwards"})},startIcon:W,endIcon:Y,$$slots:{startIcon:!0,endIcon:!0}})}},$$slots:{default:!0}})}};U(P,L=>{i()||c(f).length?L(O):L(I,!1)})}S(T,C)};U(A,T=>{c(h).length&&T(k)})}S(y,x)},$$slots:{default:!0}})}S(t,p),se(),u()}function Ioe(t,e){ae(e,!0);const n=()=>H(tr,"$selectedCollection",a),r=()=>H(Lu,"$selectedEntries",a),i=()=>H(ce,"$_",a),o=()=>H(rl,"$listedEntries",a),[a,s]=ve();let l=N(e,"open",15,!1);const u=_(()=>{const d=n()?.name;return r().length&&d&&da({collectionName:d})?.entryRelative?r().map(f=>_0({entry:f,collectionName:d,relative:!0})).flat(1):[]});{let d=_(()=>r().length===1?i()("delete_entry"):i()("delete_entries")),f=_(()=>i()("delete"));md(t,{get title(){return c(d)},get okLabel(){return c(f)},onOk:()=>{QR(r(),c(u))},get open(){return l()},set open(h){l(h)},children:(h,p)=>{var g=X(),m=M(g);{var v=y=>{var w=Fe();Z(x=>ne(w,x),[()=>i()(c(u).length?"confirm_deleting_selected_entry_with_assets":"confirm_deleting_selected_entry")]),S(y,w)},b=y=>{var w=X(),x=M(w);{var E=A=>{var k=Fe();Z(T=>ne(k,T),[()=>i()(c(u).length?"confirm_deleting_all_entries_with_assets":"confirm_deleting_all_entries")]),S(A,k)},$=A=>{var k=Fe();Z(T=>ne(k,T),[()=>i()(c(u).length?"confirm_deleting_selected_entries_with_assets":"confirm_deleting_selected_entries",{values:{count:r().length}})]),S(A,k)};U(x,A=>{r().length===o().length?A(E):A($,!1)},!0)}S(y,w)};U(m,y=>{r().length===1?y(v):y(b,!1)})}S(h,g)},$$slots:{default:!0}})}se(),s()}var Noe=j('<div role="none" class="description svelte-83jnuc"><!></div>'),Roe=j("<!> <!>",1),Moe=j('<!> <h2 role="none" class="svelte-83jnuc"> </h2> <!> <!>',1),Doe=j('<svelte-css-wrapper style="display: contents"><!></svelte-css-wrapper>',1),Foe=j("<!> <!>",1),zoe=j("<!> <!>",1);const joe={hash:"svelte-83jnuc",code:"h2.svelte-83jnuc {flex:none !important;}.description.svelte-83jnuc {flex:auto;font-size:var(--sui-font-size-small);opacity:0.8;}"};function Uoe(t,e){ae(e,!0),ke(t,joe);const n=()=>H(tr,"$selectedCollection",l),r=()=>H(Bt,"$appLocale",l),i=()=>H(ce,"$_",l),o=()=>H(mn,"$isSmallScreen",l),a=()=>H(Lu,"$selectedEntries",l),s=()=>H(rl,"$listedEntries",l),[l,u]=ve();let d=ie(!1);const f=T=>Qr.sanitize(Ut.parseInline(T),{ALLOWED_TAGS:["strong","em","del","code","a"],ALLOWED_ATTR:["href"]}),h=_(()=>n()?.name??""),p=_(()=>n()?.description),g=_(()=>!Hm(n())),m=_(()=>r()&&n()?Za(n()):c(h)),v=_(()=>{const T=n();return T?._type==="entry"?{isEntryCollection:!0,canCreate:T.create??!1,canDelete:T.delete??!0,limit:T.limit??1/0}:{isEntryCollection:!1,canCreate:!1,canDelete:!1,limit:1/0}}),b=_(()=>c(v).isEntryCollection),y=_(()=>c(v).canCreate),w=_(()=>c(v).canDelete),x=_(()=>c(v).limit);var E=zoe(),$=M(E);{var A=T=>{var C=Foe(),P=M(C);{let L=_(()=>i()("collection"));io(P,{variant:"primary",get"aria-label"(){return c(L)},children:(D,B)=>{var K=Moe(),G=M(K);{var W=te=>{{let de=_(()=>i()("back_to_collection_list"));oc(te,{get"aria-label"(){return c(de)},onclick:()=>{qs("/collections")}})}};U(G,te=>{o()&&te(W)})}var Y=z(G,2),R=F(Y),q=z(Y,2);{var J=te=>{_i(te,{flex:!0})},Q=te=>{var de=Noe(),he=F(de);Ur(he,{children:(ue,ge)=>{var ye=X(),me=M(ye);_r(me,()=>f(c(p)||"")),S(ue,ye)},$$slots:{default:!0}}),S(te,de)};U(q,te=>{o()?te(J):te(Q,!1)})}var ee=z(q,2);{var re=te=>{var de=Roe(),he=M(de);{var ue=ye=>{{let me=_(()=>i()("delete")),Ae=_(()=>a().length===1?i()("delete_selected_entry"):i()("delete_selected_entries")),Ce=_(()=>!a().length||!c(w));et(ye,{variant:"ghost",get label(){return c(me)},get"aria-label"(){return c(Ae)},get disabled(){return c(Ce)},onclick:()=>{V(d,!0)}})}};U(he,ye=>{o()||ye(ue)})}var ge=z(he,2);dL(ge,{children:(ye,me)=>{var Ae=X(),Ce=M(Ae);{var _e=fe=>{{let be=_(()=>o()?void 0:i()("create"));rM(fe,{get collectionName(){return c(h)},get label(){return c(be)},keyShortcuts:"Accel+E"})}};U(Ce,fe=>{(!o()||s().length&&!c(g))&&fe(_e)})}S(ye,Ae)},$$slots:{default:!0}}),S(te,de)};U(ee,te=>{c(b)&&te(re)})}Z(()=>ne(R,c(m))),S(D,K)},$$slots:{default:!0}})}var O=z(P,2);{var I=L=>{var D=Doe(),B=M(D);Vu(B,()=>({"--sui-infobar-border-width":"1px 0","--sui-infobar-message-justify-content":"center"})),Jm(B.lastChild,{dismissible:!1,children:(K,G)=>{var W=X(),Y=M(W);{var R=J=>{var Q=Fe();Z(ee=>ne(Q,ee),[()=>i()("creating_entries_disabled_by_admin")]),S(J,Q)},q=J=>{var Q=Fe();Z(ee=>ne(Q,ee),[()=>i()("creating_entries_disabled_by_limit",{values:{limit:c(x)}})]),S(J,Q)};U(Y,J=>{c(y)?J(q,!1):J(R)})}S(K,W)},$$slots:{default:!0}}),S(L,D)};U(O,L=>{c(b)&&c(g)&&L(I)})}S(T,C)};U($,T=>{n()&&T(A)})}var k=z($,2);Ioe(k,{get open(){return c(d)},set open(T){V(d,T,!0)}}),S(t,E),se(),u()}function Boe(t,e){ae(e,!0);const n=()=>H(tr,"$selectedCollection",s),r=()=>H(Qh,"$isLargeScreen",s),i=()=>H(ci,"$currentView",s),o=()=>H(ce,"$_",s),a=()=>H(Wn,"$allAssets",s),[s,l]=ve(),u=_(()=>da({collectionName:n()?.name})),d=_(()=>c(u)??{internalPath:void 0,entryRelative:!1,hasTemplateTags:!1}),f=_(()=>c(d).internalPath),h=_(()=>c(d).entryRelative),p=_(()=>c(d).hasTemplateTags),g=_(()=>c(h)||c(p));var m=X(),v=M(m);{var b=y=>{{let w=_(()=>o()("collection_assets"));ma(y,{id:"collection-assets",class:"secondary-sidebar",get"aria-label"(){return c(w)},children:(x,E)=>{Pd(x,{get disabled(){return c(g)},multiple:!0,onDrop:({files:$})=>{Je(Oo,{folder:c(u),files:$})},children:($,A)=>{{let k=_(()=>a().filter(T=>fn(T.folder,c(u))));SR($,{get assets(){return c(k)},onSelect:({asset:T})=>{Zt(`/assets/${T.path}`,{transitionType:"forwards"})}})}},$$slots:{default:!0}})},$$slots:{default:!0}})}};U(v,y=>{c(f)!==void 0&&r()&&i().showMedia&&y(b)})}S(t,m),se(),l()}var qoe=j("<!> <!>",1);function Hoe(t,e){ae(e,!0);const n=()=>H(ce,"$_",i),r=()=>H(e.currentView,"$currentView",i),[i,o]=ve();let a=N(e,"label",3,""),s=N(e,"disabled",3,!1),l=N(e,"noneLabel",3,""),u=N(e,"groups",19,()=>[]);{const d=h=>{{let p=_(()=>n()("grouping_options"));xr(h,{get"aria-label"(){return c(p)},get"aria-controls"(){return e["aria-controls"]},children:(g,m)=>{var v=qoe(),b=M(v);{let w=_(()=>l()||n()("sort_keys.none")),x=_(()=>!r().group);eh(b,{get label(){return c(w)},get checked(){return c(x)},onSelect:()=>{e.currentView.update(E=>({...E,group:null}))}})}var y=z(b,2);rt(y,17,u,yr,(w,x)=>{let E=()=>c(x).label,$=()=>c(x).field,A=()=>c(x).pattern;{let k=_(()=>r().group?.field===$()&&String(r().group.pattern)===String(A()));eh(w,{get label(){return E()},get checked(){return c(k)},onSelect:()=>{e.currentView.update(T=>({...T,group:{field:$(),pattern:A()}}))}})}}),S(g,v)},$$slots:{default:!0}})}};let f=_(()=>a()||n()("group"));ei(t,{variant:"ghost",get label(){return c(f)},get disabled(){return s()},popupPosition:"bottom-right",popup:d,$$slots:{popup:!0}})}se(),o()}var Koe=j("<!> <!>",1),Voe=j("<!> <!> <!> <!> <!> <!> <!>",1);function Goe(t,e){ae(e,!0);const n=()=>H(tr,"$selectedCollection",h),r=()=>H(rl,"$listedEntries",h),i=()=>H(ce,"$_",h),o=()=>H(mn,"$isSmallScreen",h),a=()=>H(Ta,"$isMediumScreen",h),s=()=>H(I1,"$entryGroups",h),l=()=>H(aoe,"$sortKeys",h),u=()=>H(Yie,"$viewFilters",h),d=()=>H(Qie,"$viewGroups",h),f=()=>H(ci,"$currentView",h),[h,p]=ve(),g=_(()=>n()?._type==="entry"?n():void 0),m=_(()=>c(g)?.name),v=_(()=>c(g)?._thumbnailFieldNames??[]),b=_(()=>!!r().length),y=_(()=>r().length>1);var w=X(),x=M(w);{var E=$=>{{let A=_(()=>i()("entry_list"));io($,{variant:"secondary",get"aria-label"(){return c(A)},children:(k,T)=>{var C=Voe(),P=M(C);{var O=J=>{{let Q=_(()=>s().map(({entries:ee})=>ee).flat(1));tR(J,{get allItems(){return c(Q)},get selectedItems(){return Lu}})}};U(P,J=>{o()||a()||J(O)})}var I=z(P,2);_i(I,{flex:!0});var L=z(I,2);{let J=_(()=>!c(y)||!l().length);nR(L,{get disabled(){return c(J)},get currentView(){return ci},get sortKeys(){return l()},get collectionName(){return c(m)},"aria-controls":"entry-list"})}var D=z(L,2);{var B=J=>{{let Q=_(()=>!c(y));eR(J,{get disabled(){return c(Q)},get currentView(){return ci},get filters(){return u()},multiple:!0,"aria-controls":"entry-list"})}};U(D,J=>{u()?.length&&J(B)})}var K=z(D,2);{var G=J=>{{let Q=_(()=>!c(y));Hoe(J,{get disabled(){return c(Q)},get currentView(){return ci},get groups(){return d()},"aria-controls":"entry-list"})}};U(K,J=>{d()?.length&&J(G)})}var W=z(K,2);{var Y=J=>{{let Q=_(()=>!c(b));_1(J,{get disabled(){return c(Q)},get currentView(){return ci},"aria-controls":"entry-list"})}};U(W,J=>{c(v).length&&J(Y)})}var R=z(W,2);{var q=J=>{var Q=Koe(),ee=M(Q);vi(ee,{orientation:"vertical"});var re=z(ee,2);{const te=ge=>{Qe(ge,{name:"photo_library"})};let de=_(()=>!c(b)||!da({collectionName:c(m)})),he=_(()=>!!f().showMedia),ue=_(()=>i()(f().showMedia?"hide_assets":"show_assets"));et(re,{variant:"ghost",iconic:!0,get disabled(){return c(de)},get pressed(){return c(he)},"aria-controls":"collection-assets",get"aria-expanded"(){return f().showMedia},get"aria-label"(){return c(ue)},onclick:()=>{ci.update(ge=>({...ge,showMedia:!f().showMedia}))},startIcon:te,$$slots:{startIcon:!0}})}S(J,Q)};U(R,J=>{o()||a()||J(q)})}S(k,C)},$$slots:{default:!0}})}};U(x,$=>{c(g)&&$(E)})}S(t,w),se(),p()}var Woe=j("<!> <!> <!> <!>",1);function Yoe(t,e){ae(e,!0);const n=()=>H(tr,"$selectedCollection",l),r=()=>H(mn,"$isSmallScreen",l),i=()=>H(ce,"$_",l),o=()=>H(rl,"$listedEntries",l),a=()=>H(Bt,"$appLocale",l),s=()=>H(Lf,"$contentUpdatesToast",l),[l,u]=ve(),d=/^\/collections(?:\/(?<_collectionName>[^/]+)(?:\/(?<routeType>new|entries))?(?:\/(?<subPath>.+?))?)?$/;let f=ie(!1);const h=_(()=>"files"in(n()??{})?xoe:_oe),p=()=>{const{path:w,params:x}=wa(),E=w.match(d);if(V(f,!1),n()?.name==="_singletons"&&Qs().length&&Je(tr,void 0),!E?.groups)return;const{_collectionName:$,routeType:A,subPath:k}=E.groups;if(!$){if(r())Je(tr,void 0),Je(Ai,i()("viewing_collection_list")),V(f,!0);else{const I=n()||h8()||GO();Zt(`/collections/${I?.name}`,{replaceState:!0})}return}const T=ki($);if(!T||T.hide?Je(tr,void 0):n()?.name!==T.name&&Je(tr,T),!T||!n()){Je(Ai,i()("collection_not_found"));return}const{name:C}=n(),P=Za(n()),O="_fileMap"in n()?n()._fileMap:void 0;if(!A){const I=o().length;Je(Ai,i()(I>1?"viewing_x_collection_many_entries":I===1?"viewing_x_collection_one_entry":"viewing_x_collection_no_entries",{values:{collection:P,count:I}}));return}if(Je(vc,!0),O){if(A==="entries"&&k){const I=f0(C,k),L=O[k];hf(I?{collection:T,collectionFile:L,originalEntry:I}:{collection:T,collectionFile:L,originalEntry:{slug:L.name,locales:Object.fromEntries(L._i18n.initialLocales.map(D=>[D,{}]))}}),Je(Ai,i()(`edit_${T._type}_announcement`,{values:{collection:P,file:Fh(L)}}))}}else if(A==="new"&&!k&&(hf({collection:T,dynamicValues:x,isIndexFile:!!window.history.state?.index}),Je(Ai,i()("create_entry_announcement",{values:{collection:P}}))),A==="entries"&&k){const I=o().find(L=>L.subPath===k);I&&a()&&(hf({collection:T,originalEntry:I}),Je(Ai,i()("edit_entry_announcement",{values:{collection:P,entry:ld(n(),I)}})))}};Vt(()=>{p()});var g=Woe();ui("hashchange",Fl,w=>{h1(w,p,d)});var m=M(g);{const w=$=>{var A=X(),k=M(A);{var T=C=>{Loe(C,{})};U(k,C=>{(!r()||c(f))&&C(T)})}S($,A)},x=$=>{var A=X(),k=M(A);{var T=C=>{{const P=K=>{Uoe(K,{})},O=K=>{var G=X(),W=M(G);{var Y=R=>{Goe(R,{})};U(W,R=>{n()?._type==="entry"&&o().length&&R(Y)})}S(K,G)},I=K=>{var G=X(),W=M(G);br(W,()=>c(h),(Y,R)=>{R(Y,{})}),S(K,G)},L=K=>{Boe(K,{})};let D=_(()=>i()("x_collection",{values:{collection:a()&&n()?Za(n()):""}})),B=_(()=>n()?.description);np(C,{get"aria-label"(){return c(D)},get"aria-description"(){return c(B)},primaryToolbar:P,secondaryToolbar:O,mainContent:I,secondarySidebar:L,$$slots:{primaryToolbar:!0,secondaryToolbar:!0,mainContent:!0,secondarySidebar:!0}})}};U(k,C=>{(!r()||!c(f))&&C(T)})}S($,A)};let E=_(()=>i()("content_library"));Ec(m,{get"aria-label"(){return c(E)},primarySidebar:w,main:x,$$slots:{primarySidebar:!0,main:!0}})}var v=z(m,2);Vie(v,{});var b=z(v,2);nr(b,{get show(){return s().saved},set show(w){bt(Lf,xe(s).saved=w,xe(s))},children:(w,x)=>{Hn(w,{status:"success",children:(E,$)=>{var A=Fe();Z(k=>ne(A,k),[()=>i()(s().published?"entry_saved_and_published":"entry_saved")]),S(E,A)},$$slots:{default:!0}})},$$slots:{default:!0}});var y=z(b,2);nr(y,{get show(){return s().deleted},set show(w){bt(Lf,xe(s).deleted=w,xe(s))},children:(w,x)=>{Hn(w,{status:"success",children:(E,$)=>{var A=Fe();Z(k=>ne(A,k),[()=>i()(s().count===1?"entry_deleted":"entries_deleted",{values:{count:s().count}})]),S(E,A)},$$slots:{default:!0}})},$$slots:{default:!0}}),S(t,g),se(),u()}function oM(t,e){ae(e,!0);const n=()=>H(ce,"$_",i),r=()=>H(ht,"$prefs",i),[i,o]=ve();{let a=_(()=>n()("prefs.i18n.default_translator.select_service"));bc(t,{get"aria-label"(){return c(a)},get value(){return r().defaultTranslationService},onChange:s=>{Je(ht,{...r(),defaultTranslationService:s.detail.value})},children:(s,l)=>{var u=X(),d=M(u);rt(d,17,()=>Object.entries(S1),([f,{serviceLabel:h}])=>f,(f,h)=>{var p=_(()=>ho(c(h),2));let g=()=>c(p)[0],m=()=>c(p)[1].serviceLabel;{let v=_(()=>g()===r().defaultTranslationService);Mr(f,{get label(){return m()},get value(){return g()},get selected(){return c(v)}})}}),S(s,u)},$$slots:{default:!0}})}se(),o()}var Joe=j("<!> <!> <!>",1);function Xoe(t,e){ae(e,!0);const n=()=>H(xv,"$translator",s),r=()=>H(vc,"$showContentOverlay",s),i=()=>H(sf,"$translatorApiKeyDialogState",s),o=()=>H(ce,"$_",s),a=()=>H(ht,"$prefs",s),[s,l]=ve(),u=_(()=>n().serviceId),d=_(()=>n().apiLabel),f=_(()=>n().developerURL),h=_(()=>n().apiKeyURL),p=_(()=>n().apiKeyPattern);ze(()=>{!r()&&i().show&&(bt(sf,xe(i).show=!1,xe(i)),i().resolve?.())});{let g=_(()=>o()(i().multiple?"translate_fields":"translate_field")),m=_(()=>({spellcheck:!1,monospace:!0,"aria-label":o()("api_key")}));pL(t,{get title(){return c(g)},showOk:!1,get textboxAttrs(){return c(m)},oninput:v=>{const b=v.target.value.trim();c(p)?.test(b)&&(bt(ht,xe(a).apiKeys??={},xe(a)),bt(ht,xe(a).apiKeys[c(u)]=b,xe(a)),bt(sf,xe(i).show=!1,xe(i)),i().resolve?.(b))},onCancel:()=>{i().resolve?.()},get open(){return i().show},set open(v){bt(sf,xe(i).show=v,xe(i))},children:(v,b)=>{var y=Joe(),w=M(y);oM(w,{});var x=z(w,2);_i(x,{});var E=z(x,2);_r(E,()=>Qr.sanitize(o()("prefs.i18n.translator.description",{values:{service:c(d),homeHref:`href="${c(f)}"`,apiKeyHref:`href="${c(h)}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})),S(v,y)},$$slots:{default:!0}})}se(),l()}function Zoe(t,e){ae(e,!0);const n=()=>H(Ex,"$entryParseErrors",i),r=()=>H(ce,"$_",i),[i,o]=ve();let a=ie(!!n().length);nr(t,{get show(){return c(a)},set show(s){V(a,s,!0)},children:(s,l)=>{Hn(s,{status:"error",children:(u,d)=>{var f=Fe();Z(h=>ne(f,h),[()=>r()(n().length===1?"entry_parse_error":"entry_parse_errors")]),S(u,f)},$$slots:{default:!0}})},$$slots:{default:!0}}),se(),o()}const aM=sn([Qh,Cd,Cn,Un],([t,e,n,r])=>t&&e&&!!n?.isGit&&!!r?.token),rm=it(!1);var Qoe=j(" <!> <!>",1),eae=j('<svelte-css-wrapper style="display: contents"><!></svelte-css-wrapper>',1);function tae(t,e){ae(e,!0);const n=()=>H(Cn,"$backend",i),r=()=>H(ce,"$_",i),[i,o]=ve();let a,s=ie(!1);ze(()=>{const{databaseName:d}=n()?.repository??{};d&&(a=new jo(d,"ui-settings"),(async()=>{const f=await a.get("onboarding")??{};f.mobileCta||V(s,!0),await a.set("onboarding",{...f,mobileCta:!0})})())});var l=eae(),u=M(l);Vu(u,()=>({"--sui-infobar-message-justify-content":"center"})),Jm(u.lastChild,{get show(){return c(s)},dismissible:!1,children:(d,f)=>{var h=Qoe(),p=M(h),g=z(p);{let v=_(()=>r()("mobile_promo_button"));et(g,{variant:"link",get label(){return c(v)},onclick:()=>{V(s,!1),Je(rm,!0)}})}var m=z(g,2);{let v=_(()=>r()("later"));et(m,{variant:"link",get label(){return c(v)},onclick:()=>{V(s,!1)}})}Z(v=>ne(p,`${v??""} `),[()=>r()("mobile_promo_title")]),S(d,h)},$$slots:{default:!0}}),S(t,l),se(),o()}var nae=j('<div role="none" class="wrapper svelte-t2r4ty"><!></div>');const rae={hash:"svelte-t2r4ty",code:`.wrapper.svelte-t2r4ty {display:contents;}.wrapper.svelte-t2r4ty .sui.select-button-group {gap:4px;}
|
|
695
694
|
@media (width < 768px) {.wrapper.svelte-t2r4ty .sui.select-button-group {justify-content:space-evenly;width:100%;}
|
|
696
|
-
}.wrapper.svelte-t2r4ty .sui.button {border-radius:var(--sui-button-medium-border-radius) !important;}`};function sM(t,e){ae(e,!0),ke(t,rae);const n=()=>H(ce,"$_",a),r=()=>H(mn,"$isSmallScreen",a),i=()=>H(Po,"$selectedAssetFolder",a),o=()=>H(ow,"$selectedPageName",a),[a,s]=ve(),l=_(()=>[{key:"collections",label:n()("contents"),icon:"library_books",link:"/collections"},{key:"assets",label:n()("assets"),icon:"photo_library",link:r()?"/assets":`/assets/${i()?.internalPath??"-/all"}`},...r()?[{key:"menu",label:n()("menu"),icon:"menu",link:"/menu"}]:[]]);var u=nae(),d=F(u);{let f=_(()=>n()("switch_page"));Xm(d,{get"aria-label"(){return c(f)},"aria-controls":"page-container",children:(h,p)=>{var g=X(),m=M(g);rt(m,19,()=>c(l),({key:v,label:b,icon:y,link:w})=>v,(v,b,y)=>{let w=()=>c(b).key,x=()=>c(b).label,E=()=>c(b).icon,$=()=>c(b).link;{const A=C=>{Qe(C,{get name(){return E()}})};let k=_(()=>o()===w()),T=_(()=>c(y)+1);Qf(v,{variant:"ghost",iconic:!0,get selected(){return c(k)},get"aria-label"(){return x()},get keyShortcuts(){return`Alt+${c(T)??""}`},onclick:()=>{Zt($())},startIcon:A,$$slots:{startIcon:!0}})}}),S(h,g)},$$slots:{default:!0}})}S(t,u),se(),s()}var iae=j('<div role="none" class="buttons"><!></div>');function oae(t,e){ae(e,!0);const n=()=>H(d1,"$hasOverlay",i),r=()=>H(ce,"$_",i),[i,o]=ve();W6(t,{get inert(){return n()},children:(a,s)=>{{let l=_(()=>r()("global"));io(a,{variant:"primary",get"aria-label"(){return c(l)},children:(u,d)=>{var f=iae(),h=F(f);sM(h,{}),S(u,f)},$$slots:{default:!0}})}},$$slots:{default:!0}}),se(),o()}var aae=j('<span class="version svelte-wmw2gz"> </span>');const sae={hash:"svelte-wmw2gz",code:".version.svelte-wmw2gz {border-radius:4px;padding:0 6px;color:var(--sui-secondary-foreground-color);background-color:var(--sui-selected-background-color);font-size:var(--sui-font-size-small);}"};function lae(t,e){ae(e,!0),ke(t,sae);const n=()=>H(ce,"$_",i),r=()=>H(ht,"$prefs",i),[i,o]=ve();{const a=l=>{var u=X(),d=M(u);{var f=h=>{var p=aae(),g=F(p);Z(m=>{Se(p,"aria-label",`(${m??""})`),ne(g,`v${Qb}`)},[()=>n()("version_x",{values:{version:Qb}})]),S(h,p)};U(d,h=>{r().devModeEnabled&&h(f)})}S(l,u)};let s=_(()=>n()("release_notes"));vt(t,{get label(){return c(s)},onclick:()=>{window.open("https://github.com/sveltia/sveltia-cms/releases","_blank")},endIcon:a,$$slots:{endIcon:!0}})}se(),o()}var cae=j('<kbd class="svelte-13q15u"> </kbd>'),uae=j("<!> <!>",1),dae=j('<div role="none" class="wrapper svelte-13q15u"><!></div>');const fae={hash:"svelte-13q15u",code:".wrapper.svelte-13q15u {display:contents;}.wrapper.svelte-13q15u .table-row {display:flex;align-items:center;gap:16px;padding:8px 0;border-top:1px solid var(--sui-secondary-border-color);}.wrapper.svelte-13q15u .table-row:last-child {border-bottom:1px solid var(--sui-secondary-border-color);}.wrapper.svelte-13q15u .table-row .feature {flex:auto;}.wrapper.svelte-13q15u .table-row .keys {display:flex;gap:8px;}kbd.svelte-13q15u {display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;border-color:var(--sui-primary-accent-color);border-radius:4px;padding:0 8px;height:32px;min-width:32px;background-color:var(--sui-tertiary-background-color);font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);}"};function hae(t,e){ae(e,!0),ke(t,fae);const n=()=>H(ce,"$_",r),[r,i]=ve();let o=N(e,"open",15,!1),a=N(e,"onClose",3,void 0);const s=[{feature:"view_content_library",keys:"Alt+1"},{feature:"view_asset_library",keys:"Alt+2"},{feature:"search",keys:"Accel+F"},{feature:"create_entry",keys:"Accel+E"},{feature:"save_entry",keys:"Accel+S"},{feature:"cancel_editing",keys:"Escape"}];let l=ie("Ctrl");Vt(()=>{(navigator.userAgentData?.platform==="macOS"||navigator.platform.startsWith("Mac"))&&V(l,"⌘")});{let u=_(()=>n()("keyboard_shortcuts"));xo(t,{get title(){return c(u)},size:"small",showOk:!1,showCancel:!1,showClose:!0,style:"--sui-dialog-small-content-max-height:auto",onClose:()=>{a()?.()},get open(){return o()},set open(d){o(d)},children:(d,f)=>{var h=dae(),p=F(h);{let g=_(()=>n()("keyboard_shortcuts"));D9(p,{get"aria-label"(){return c(g)},children:(m,v)=>{var b=X(),y=M(b);rt(y,17,()=>s,({feature:w,keys:x})=>x,(w,x)=>{let E=()=>c(x).feature,$=()=>c(x).keys;N9(w,{children:(A,k)=>{var T=uae(),C=M(T);cE(C,{class:"feature",children:(O,I)=>{var L=Fe();Z(D=>ne(L,D),[()=>n()(`keyboard_shortcuts_.${E()}`)]),S(O,L)},$$slots:{default:!0}});var P=z(C,2);cE(P,{class:"keys",children:(O,I)=>{var L=X(),D=M(L);rt(D,17,()=>$().split("+"),yr,(B,K)=>{var G=cae(),W=F(G);Z(Y=>ne(W,Y),[()=>c(K).replace("Accel",c(l))]),S(B,G)}),S(O,L)},$$slots:{default:!0}}),S(A,T)},$$slots:{default:!0}})}),S(m,b)},$$slots:{default:!0}})}S(d,h)},$$slots:{default:!0}})}se(),i()}var pae=j("<!> <!>",1);function gae(t,e){ae(e,!0);const n=()=>H(Cd,"$hasMouse",i),r=()=>H(ce,"$_",i),[i,o]=ve();let a=ie(!1);var s=pae(),l=M(s);{var u=f=>{{let h=_(()=>r()("keyboard_shortcuts"));vt(f,{get label(){return c(h)},onclick:()=>{V(a,!0)}})}};U(l,f=>{n()&&f(u)})}var d=z(l,2);hae(d,{onClose:()=>{e.menuButton?.focus()},get open(){return c(a)},set open(f){V(a,f,!0)}}),S(t,s),se(),o()}function uu(t,e){ae(e,!0);const n=()=>H(ht,"$prefs",r),[r,i]=ve();let o=N(e,"defaultValue",3,!0),a=ie(!0);ze(()=>{V(a,!!(n()[e.key]??o()),!0)}),ze(()=>{n()[e.key]!==c(a)&&bt(ht,xe(n)[e.key]=c(a),xe(n))}),w0(t,{get label(){return e.label},get checked(){return c(a)},set checked(s){V(a,s,!0)}}),se(),i()}var mae=j('<section><h4> </h4> <p> </p> <div role="none"><!></div></section>');function vae(t,e){ae(e,!0);const n=()=>H(ce,"$_",r),[r,i]=ve();N(e,"onChange",3,void 0);var o=mae(),a=F(o),s=F(a),l=z(a,2),u=F(l),d=z(l,2),f=F(d);{let h=_(()=>n()("prefs.accessibility.underline_links.switch_label"));uu(f,{key:"underlineLinks",get label(){return c(h)}})}Z((h,p)=>{ne(s,h),ne(u,p)},[()=>n()("prefs.accessibility.underline_links.title"),()=>n()("prefs.accessibility.underline_links.description")]),S(t,o),se(),i()}var _ae=j('<section><h4> </h4> <p> </p> <div role="none"><!></div> <div role="none"><!></div></section>'),bae=j('<section><h4> </h4> <p> </p> <div role="none"><!></div></section> <section><h4> </h4> <p> </p> <div role="none"><!></div></section> <!>',1);function yae(t,e){ae(e,!0);const n=()=>H(ce,"$_",o),r=()=>H(p1,"$skipCIConfigured",o),i=()=>H(ht,"$prefs",o),[o,a]=ve();let s=N(e,"onChange",3,void 0);var l=bae(),u=M(l),d=F(u),f=F(d),h=z(d,2),p=F(h),g=z(h,2),m=F(g);{let T=_(()=>n()("prefs.advanced.beta.switch_label"));uu(m,{key:"beta",get label(){return c(T)},defaultValue:!1})}var v=z(u,2),b=F(v),y=F(b),w=z(b,2),x=F(w),E=z(w,2),$=F(E);{let T=_(()=>n()("prefs.advanced.developer_mode.switch_label"));uu($,{key:"devModeEnabled",get label(){return c(T)},defaultValue:!1})}var A=z(v,2);{var k=T=>{var C=_ae(),P=F(C),O=F(P),I=z(P,2),L=F(I),D=z(I,2),B=F(D);{let W=_(()=>n()("prefs.advanced.deploy_hook.url.field_label"));Yn(B,{flex:!0,get"aria-label"(){return c(W)},showInlineLabel:!0,onchange:()=>{s()?.({message:n()(i().deployHookURL?"prefs.advanced.deploy_hook.url.saved":"prefs.advanced.deploy_hook.url.removed")})},get value(){return i().deployHookURL},set value(Y){bt(ht,xe(i).deployHookURL=Y,xe(i))}})}var K=z(D,2),G=F(K);{let W=_(()=>n()("prefs.advanced.deploy_hook.auth.field_label"));Yn(G,{flex:!0,get"aria-label"(){return c(W)},showInlineLabel:!0,onchange:()=>{s()?.({message:n()(i().deployHookAuthHeader?"prefs.advanced.deploy_hook.auth.saved":"prefs.advanced.deploy_hook.auth.removed")})},get value(){return i().deployHookAuthHeader},set value(Y){bt(ht,xe(i).deployHookAuthHeader=Y,xe(i))}})}Z((W,Y)=>{ne(O,W),ne(L,Y)},[()=>n()("prefs.advanced.deploy_hook.title"),()=>n()("prefs.advanced.deploy_hook.description")]),S(T,C)};U(A,T=>{r()&&T(k)})}Z((T,C,P,O)=>{ne(f,T),ne(p,C),ne(y,P),ne(x,O)},[()=>n()("prefs.advanced.beta.title"),()=>n()("prefs.advanced.beta.description"),()=>n()("prefs.advanced.developer_mode.title"),()=>n()("prefs.advanced.developer_mode.description")]),S(t,l),se(),a()}var wae=j('<section><h4> </h4> <div role="none"><!></div></section>');function xae(t,e){ae(e,!0);const n=()=>H(ce,"$_",i),r=()=>H(ht,"$prefs",i),[i,o]=ve();N(e,"onChange",3,void 0);var a=wae(),s=F(a),l=F(s),u=z(s,2),d=F(u);{let f=_(()=>n()("prefs.appearance.select_theme"));Xm(d,{get"aria-label"(){return c(f)},onChange:h=>{Je(ht,{...r(),theme:h.detail.value})},children:(h,p)=>{var g=X(),m=M(g);rt(m,16,()=>["auto","dark","light"],yr,(v,b)=>{{let y=_(()=>n()(`prefs.theme.${b}`)),w=_(()=>!r().theme&&b==="auto"||r().theme===b);Qf(v,{variant:"tertiary",get label(){return c(y)},get value(){return b},get selected(){return c(w)}})}}),S(h,g)},$$slots:{default:!0}})}Z(f=>ne(l,f),[()=>n()("prefs.appearance.theme")]),S(t,a),se(),o()}var kae=j('<section><h4> </h4> <div role="none"><!></div> <div role="none"><!></div> <div role="none"><!></div></section>');function Sae(t,e){ae(e,!0);const n=()=>H(ce,"$_",r),[r,i]=ve();N(e,"onChange",3,void 0);var o=kae(),a=F(o),s=F(a),l=z(a,2),u=F(l);{let g=_(()=>n()("prefs.contents.editor.use_draft_backup.switch_label"));uu(u,{key:"useDraftBackup",get label(){return c(g)}})}var d=z(l,2),f=F(d);{let g=_(()=>n()("prefs.contents.editor.close_on_save.switch_label"));uu(f,{key:"closeOnSave",get label(){return c(g)}})}var h=z(d,2),p=F(h);{let g=_(()=>n()("prefs.contents.editor.close_with_escape.switch_label"));uu(p,{key:"closeWithEscape",get label(){return c(g)}})}Z(g=>ne(s,g),[()=>n()("prefs.contents.editor.title")]),S(t,o),se(),i()}var Eae=j('<section><h4> </h4> <p><!></p> <div role="none"><!></div></section>'),Tae=j('<section><h4> </h4> <div role="none"><!></div></section> <!>',1);function $ae(t,e){ae(e,!0);const n=()=>H(ce,"$_",i),r=()=>H(ht,"$prefs",i),[i,o]=ve();let a=N(e,"onChange",3,void 0);var s=Tae(),l=M(s),u=F(l),d=F(u),f=z(u,2),h=F(f);oM(h,{});var p=z(l,2);rt(p,17,()=>Object.entries(S1),([g,m])=>g,(g,m)=>{var v=_(()=>ho(c(m),2));let b=()=>c(v)[0],y=()=>c(v)[1];const w=_(()=>{const{serviceLabel:O,apiLabel:I,developerURL:L,apiKeyURL:D}=y();return{serviceLabel:O,apiLabel:I,developerURL:L,apiKeyURL:D}});var x=Eae(),E=F(x),$=F(E),A=z(E,2),k=F(A);_r(k,()=>Qr.sanitize(n()("prefs.i18n.translator.description",{values:{service:c(w).apiLabel,homeHref:`href="${c(w).developerURL}"`,apiKeyHref:`href="${c(w).apiKeyURL}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]}));var T=z(A,2),C=F(T);{var P=O=>{{let I=_(()=>n()("prefs.i18n.translator.field_label",{values:{service:c(w).serviceLabel}}));Zg(O,{flex:!0,autocomplete:"off",spellcheck:"false",get"aria-label"(){return c(I)},onchange:()=>{a()?.({message:n()(r().apiKeys?.[b()]?"prefs.changes.api_key_saved":"prefs.changes.api_key_removed")})},get value(){return r().apiKeys[b()]},set value(L){bt(ht,xe(r).apiKeys[b()]=L,xe(r))}})}};U(C,O=>{r().apiKeys&&O(P)})}Z(()=>ne($,c(w).serviceLabel)),S(g,x)}),Z(g=>ne(d,g),[()=>n()("prefs.i18n.default_translator.title")]),S(t,s),se(),o()}var Aae=j('<section><h4> </h4> <div role="none"><!></div></section>');function Cae(t,e){ae(e,!0);const n=()=>H(ce,"$_",a),r=()=>H(Bt,"$appLocale",a),i=()=>H(ht,"$prefs",a),o=()=>H(z2,"$appLocales",a),[a,s]=ve();N(e,"onChange",3,void 0);var l=Aae(),u=F(l),d=F(u),f=z(u,2),h=F(f);fr(h,r,p=>{{let g=_(()=>n()("prefs.language.ui_language.select_language")),m=_(()=>r()??void 0);bc(p,{get"aria-label"(){return c(g)},get value(){return c(m)},onChange:v=>{Je(ht,{...i(),locale:v.detail.value})},children:(v,b)=>{var y=X(),w=M(y);rt(w,1,o,yr,(x,E)=>{{let $=_(()=>Uo(c(E),{displayLocale:c(E)})??c(E)),A=_(()=>c(E)===r());Mr(x,{get label(){return c($)},get value(){return c(E)},get selected(){return c(A)},dir:"auto"})}}),S(v,y)},$$slots:{default:!0}})}}),Z(p=>ne(d,p),[()=>n()("prefs.language.ui_language.title")]),S(t,l),se(),s()}var Pae=j('<section><h4> </h4> <p><!></p> <div role="none"><!></div></section>'),Oae=j('<section><h4> </h4> <p><!></p> <div role="none"><!></div></section>'),Lae=j("<!> <!>",1),Iae=j('<div role="none"> </div>');function Nae(t,e){ae(e,!0);const n=()=>H(ce,"$_",i),r=()=>H(ht,"$prefs",i),[i,o]=ve();let a=N(e,"onChange",3,void 0);const s=_(()=>{const{providers:m=[]}=zR();return Object.entries(nm).filter(([v])=>m.includes(v))}),l=_(()=>Object.entries(A1).filter(([,{isEnabled:m,authType:v}])=>(m?.()??!0)&&v!=="widget")),u=m=>Qr.sanitize(m,{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]}),d=m=>{a()?.({message:n()(r().apiKeys?.[m]?"prefs.changes.api_key_saved":"prefs.changes.api_key_removed")})};var f=X(),h=M(f);{var p=m=>{var v=X(),b=M(v);{var y=w=>{var x=Lae(),E=M(x);rt(E,17,()=>c(l),([A,k])=>A,(A,k)=>{var T=_(()=>ho(c(k),2));let C=()=>c(T)[0],P=()=>c(T)[1];const O=_(()=>{const{serviceLabel:Y}=P();return{serviceLabel:Y}});var I=Pae(),L=F(I),D=F(L),B=z(L,2),K=F(B);_r(K,()=>u(n()("prefs.media.cloud_storage.description",{values:{service:c(O).serviceLabel}})));var G=z(B,2),W=F(G);{let Y=_(()=>n()("prefs.media.cloud_storage.field_label",{values:{service:c(O).serviceLabel}}));Zg(W,{flex:!0,autocomplete:"off",spellcheck:"false",get"aria-label"(){return c(Y)},onchange:()=>d(C()),get value(){return r().apiKeys[C()]},set value(R){bt(ht,xe(r).apiKeys[C()]=R,xe(r))}})}Z(()=>ne(D,c(O).serviceLabel)),S(A,I)});var $=z(E,2);rt($,17,()=>c(s),([A,k])=>A,(A,k)=>{var T=_(()=>ho(c(k),2));let C=()=>c(T)[0],P=()=>c(T)[1];const O=_(()=>{const{serviceLabel:Y,developerURL:R,apiKeyURL:q}=P();return{serviceLabel:Y,developerURL:R,apiKeyURL:q}});var I=Oae(),L=F(I),D=F(L),B=z(L,2),K=F(B);_r(K,()=>u(n()("prefs.media.stock_photos.description",{values:{service:c(O).serviceLabel,homeHref:`href="${c(O).developerURL}"`,apiKeyHref:`href="${c(O).apiKeyURL}"`}})));var G=z(B,2),W=F(G);{let Y=_(()=>n()("prefs.media.stock_photos.field_label",{values:{service:c(O).serviceLabel}}));Zg(W,{flex:!0,autocomplete:"off",spellcheck:"false",get"aria-label"(){return c(Y)},onchange:()=>d(C()),get value(){return r().apiKeys[C()]},set value(R){bt(ht,xe(r).apiKeys[C()]=R,xe(r))}})}Z(Y=>ne(D,Y),[()=>n()("prefs.media.stock_photos.title",{values:{service:c(O).serviceLabel}})]),S(A,I)}),S(w,x)};U(b,w=>{r().apiKeys&&w(y)})}S(m,v)},g=m=>{cr(m,{children:(v,b)=>{var y=Iae(),w=F(y);Z(x=>ne(w,x),[()=>n()("prefs.media.libraries_disabled")]),S(v,y)},$$slots:{default:!0}})};U(h,m=>{c(s).length||c(l).length?m(p):m(g,!1)})}S(t,f),se(),o()}const im=sn([Pt],([t])=>[{key:"appearance",icon:"palette",component:xae},{key:"language",icon:"language",component:Cae},{key:"contents",icon:"library_books",component:Sae},{key:"i18n",icon:"translate",component:$ae,enabled:(t?.i18n?.locales?.length??0)>1},{key:"media",icon:"photo_library",component:Nae},{key:"accessibility",icon:"accessibility_new",component:vae},{key:"advanced",icon:"build",component:yae}]);var Rae=j('<div role="none" class="wrapper svelte-pwxwga"><!> <!></div>'),Mae=j("<!> <!>",1);const Dae={hash:"svelte-pwxwga",code:".wrapper.svelte-pwxwga {display:flex;}.wrapper.svelte-pwxwga .sui.tab-list {flex:none;}.wrapper.svelte-pwxwga .sui.tab-panel {flex:auto;border-width:0;}.wrapper.svelte-pwxwga .sui.tab-panel section:not(:first-child) {margin:16px 0 0;}.wrapper.svelte-pwxwga .sui.tab-panel p {margin-top:0;}.wrapper.svelte-pwxwga .sui.tab-panel h4 {font-size:inherit;}.wrapper.svelte-pwxwga .sui.tab-panel h4 ~ div {margin:8px 0 0;}.wrapper.svelte-pwxwga .sui.tab-panel h4 ~ p {margin:8px 0 0;color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);}"};function Fae(t,e){ae(e,!0),ke(t,Dae);const n=()=>H(ce,"$_",r),[r,i]=ve();let o=N(e,"open",15,!1),a=N(e,"onClose",3,void 0),s=ie("appearance"),l=ie(""),u=ie(!1);var d=Mae(),f=M(d);{let p=_(()=>n()("settings"));xo(f,{get title(){return c(p)},size:"large",showOk:!1,showCancel:!1,showClose:!0,onClose:()=>{a()?.()},get open(){return o()},set open(g){o(g)},children:(g,m)=>{var v=Rae(),b=F(v);{let w=_(()=>n()("categories"));j9(b,{orientation:"vertical",get"aria-label"(){return c(w)},children:(x,E)=>{var $=X(),A=M($);rt(A,17,()=>oe(im),({key:k,icon:T,enabled:C=!0})=>k,(k,T)=>{let C=()=>c(T).key,P=()=>c(T).icon,O=bw(()=>at(c(T).enabled,!0));var I=X(),L=M(I);{var D=B=>{{const K=Y=>{Qe(Y,{get name(){return P()}})};let G=_(()=>n()(`prefs.${C()}.title`)),W=_(()=>C()===c(s));H9(B,{get label(){return c(G)},get selected(){return c(W)},get"aria-controls"(){return`prefs-tab-${C()??""}`},onSelect:()=>{V(s,C(),!0)},startIcon:K,$$slots:{startIcon:!0}})}};U(L,B=>{c(O)&&B(D)})}S(k,I)}),S(x,$)},$$slots:{default:!0}})}var y=z(b,2);rt(y,17,()=>oe(im),({key:w,component:x})=>w,(w,x)=>{let E=()=>c(x).key,$=()=>c(x).component;q9(w,{get id(){return`prefs-tab-${E()??""}`},children:(A,k)=>{var T=X(),C=M(T);br(C,$,(P,O)=>{O(P,{onChange:({message:I})=>{V(l,I,!0),V(u,!0)}})}),S(A,T)},$$slots:{default:!0}})}),S(g,v)},$$slots:{default:!0}})}var h=z(f,2);nr(h,{get show(){return c(u)},set show(p){V(u,p,!0)},children:(p,g)=>{Hn(p,{status:"success",children:(m,v)=>{var b=Fe();Z(()=>ne(b,c(l))),S(m,b)},$$slots:{default:!0}})},$$slots:{default:!0}}),S(t,d),se(),i()}var zae=j("<!> <!>",1),jae=j("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),Uae=j("<!> <!>",1);function lM(t,e){ae(e,!0);const n=()=>H(mc,"$backendName",u),r=()=>H(ce,"$_",u),i=()=>H(Un,"$user",u),o=()=>H(ht,"$prefs",u),a=()=>H(Cn,"$backend",u),s=()=>H(mn,"$isSmallScreen",u),l=()=>H(aM,"$canShowMobileSignInDialog",u),[u,d]=ve();let f=ie(!1);const h=_(()=>n()==="local"),p=_(()=>n()==="test-repo");var g=Uae(),m=M(g);{let b=_(()=>r()("account"));xr(m,{get"aria-label"(){return c(b)},children:(y,w)=>{var x=jae(),E=M(x);{let W=_(()=>c(h)?r()("working_with_local_repo"):c(p)?r()("working_with_test_repo"):r()("signed_in_as_x",{values:{name:i()?.login}})),Y=_(()=>c(h)||c(p));vt(E,{get label(){return c(W)},get disabled(){return c(Y)},onclick:()=>{window.open(i()?.profileURL,"_blank")}})}var $=z(E,2);vi($,{});var A=z($,2);{let W=_(()=>r()("live_site"));vt(A,{get label(){return c(W)},onclick:()=>{MN()}})}var k=z(A,2);{var T=W=>{var Y=zae(),R=M(Y);{let J=_(()=>r()("git_repository")),Q=_(()=>!a()?.repository?.treeBaseURL);vt(R,{get label(){return c(J)},get disabled(){return c(Q)},onclick:()=>{window.open(a()?.repository?.treeBaseURL)}})}var q=z(R,2);{let J=_(()=>r()("cms_config"));vt(q,{get label(){return c(J)},onclick:()=>{Zt("/config",{transitionType:"forwards"})}})}S(W,Y)};U(k,W=>{o().devModeEnabled&&W(T)})}var C=z(k,2);vi(C,{});var P=z(C,2);{let W=_(()=>r()("settings"));vt(P,{get label(){return c(W)},onclick:()=>{s()?Zt("/settings",{transitionType:"forwards"}):V(f,!0)}})}var O=z(P,2);gae(O,{get menuButton(){return e.menuButton}});var I=z(O,2);{var L=W=>{lae(W,{})};U(I,W=>{o().devModeEnabled&&W(L)})}var D=z(I,2);{var B=W=>{{let Y=_(()=>r()("sign_in_with_mobile"));vt(W,{get label(){return c(Y)},onclick:()=>{Je(rm,!0)}})}};U(D,W=>{l()&&W(B)})}var K=z(D,2);vi(K,{});var G=z(K,2);{let W=_(()=>r()("sign_out"));vt(G,{get label(){return c(W)},onclick:async()=>{window.requestAnimationFrame(()=>{BW()})}})}S(y,x)},$$slots:{default:!0}})}var v=z(m,2);Fae(v,{onClose:()=>{e.menuButton?.focus()},get open(){return c(f)},set open(b){V(f,b,!0)}}),S(t,g),se(),d()}var Bae=j('<img class="avatar svelte-q0ng4j" loading="lazy" alt=""/>'),qae=j('<div role="none" class="wrapper svelte-q0ng4j"><!></div>');const Hae={hash:"svelte-q0ng4j",code:".wrapper.svelte-q0ng4j {display:contents;}.wrapper.svelte-q0ng4j button.avatar {border-width:0;background-color:transparent;}.avatar.svelte-q0ng4j {width:32px;height:32px;border-radius:32px;object-fit:cover;}"};function Kae(t,e){ae(e,!0),ke(t,Hae);const n=()=>H(mc,"$backendName",o),r=()=>H(Un,"$user",o),i=()=>H(ce,"$_",o),[o,a]=ve();let s=ie(void 0);const l=_(()=>n()==="local"),u=_(()=>!!r()?.avatarURL);var d=qae(),f=F(d);{const h=y=>{var w=X(),x=M(w);{var E=A=>{Qe(A,{name:"arrow_drop_down",class:"small-arrow"})},$=A=>{var k=X(),T=M(k);{var C=O=>{var I=Bae();Z(()=>Se(I,"src",r()?.avatarURL)),S(O,I)},P=O=>{Qe(O,{name:"account_circle"})};U(T,O=>{c(u)?O(C):O(P,!1)},!0)}S(A,k)};U(x,A=>{c(l)?A(E):A($,!1)})}S(y,w)},p=y=>{lM(y,{get menuButton(){return c(s)}})};let g=_(()=>!c(l)),m=_(()=>c(l)?i()("local_backend.indicator"):void 0),v=_(()=>c(u)?"avatar":""),b=_(()=>i()("show_account_menu"));St(ei(f,{variant:"ghost",get iconic(){return c(g)},get label(){return c(m)},get class(){return c(v)},popupPosition:"bottom-right",get"aria-label"(){return c(b)},endIcon:h,popup:p,$$slots:{endIcon:!0,popup:!0}}),y=>V(s,y,!0),()=>c(s))}S(t,d),se(),a()}var Vae=j("<!> <!>",1),Gae=j("<!> <!>",1);function Wae(t,e){ae(e,!0);const n=()=>H(ce,"$_",r),[r,i]=ve(),o=_(()=>Qs({visible:!0,type:"entry"}));{const a=u=>{Qe(u,{name:"add"})},s=u=>{{let d=_(()=>n()("create_entry_or_assets"));xr(u,{get"aria-label"(){return c(d)},children:(f,h)=>{var p=Gae(),g=M(p);{var m=b=>{var y=Vae(),w=M(y);rt(w,17,()=>c(o),E=>E.name,(E,$)=>{const A=_(()=>{const{name:k,label:T,label_singular:C,create:P=!1,limit:O=1/0}=c($);return{name:k,label:T,labelSingular:C,create:P,limit:O}});{let k=_(()=>c(A).labelSingular||c(A).label||c(A).name),T=_(()=>!c(A).create||Sa(c(A).name).length>=c(A).limit);vt(E,{get label(){return c(k)},get disabled(){return c(T)},onclick:()=>{Zt(`/collections/${c(A).name}/new`,{transitionType:"forwards"})}})}});var x=z(w,2);vi(x,{}),S(b,y)};U(g,b=>{c(o).length&&b(m)})}var v=z(g,2);{let b=_(()=>n()("assets"));vt(v,{get label(){return c(b)},onclick:async()=>{Zt("/assets",{transitionType:"forwards"}),await Rt(100),Je(vs,!0)}})}S(f,p)},$$slots:{default:!0}})}};let l=_(()=>n()("create_entry_or_assets"));ei(t,{variant:"ghost",iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return c(l)},endIcon:a,popup:s,$$slots:{endIcon:!0,popup:!0}})}se(),i()}function Yae(t,e){ae(e,!0);const n=()=>H(ce,"$_",r),[r,i]=ve();{const o=s=>{Qe(s,{name:"notifications"})};let a=_(()=>n()("show_notifications"));et(t,{variant:"ghost",iconic:!0,hidden:!0,get"aria-label"(){return c(a)},onclick:()=>{},startIcon:o,$$slots:{startIcon:!0}})}se(),i()}var Jae=j('<img loading="lazy" alt="" class="logo svelte-15c9hhi"/>');const Xae={hash:"svelte-15c9hhi",code:"img.svelte-15c9hhi {width:24px;height:24px;object-fit:contain;}"};function Zae(t,e){ae(e,!0),ke(t,Xae);const n=()=>H(Pt,"$cmsConfig",i),r=()=>H(ce,"$_",i),[i,o]=ve(),a=_(()=>n()?.logo?.src??n()?.logo_url),s=_(()=>n()?.logo?.show_in_header??!0);var l=X(),u=M(l);{var d=f=>{{let h=_(()=>r()("visit_live_site"));et(f,{variant:"ghost",iconic:!0,get"aria-label"(){return c(h)},onclick:()=>{MN()},children:(p,g)=>{var m=Jae();Z(()=>Se(m,"src",c(a))),S(p,m)},$$slots:{default:!0}})}};U(u,f=>{c(a)&&c(s)&&f(d)})}S(t,l),se(),o()}var Qae=j('<div role="none" class="buttons"><!> <!></div> <!> <div role="none" class="buttons"><!> <!> <!> <!> <!></div>',1),ese=j('<div role="none" class="toolbar-wrapper svelte-1kz79fh"><!></div>');const tse={hash:"svelte-1kz79fh",code:`.toolbar-wrapper.svelte-1kz79fh {display:contents;}.toolbar-wrapper[inert].svelte-1kz79fh {display:none;}
|
|
695
|
+
}.wrapper.svelte-t2r4ty .sui.button {border-radius:var(--sui-button-medium-border-radius) !important;}`};function sM(t,e){ae(e,!0),ke(t,rae);const n=()=>H(ce,"$_",a),r=()=>H(mn,"$isSmallScreen",a),i=()=>H(Po,"$selectedAssetFolder",a),o=()=>H(ow,"$selectedPageName",a),[a,s]=ve(),l=_(()=>[{key:"collections",label:n()("contents"),icon:"library_books",link:"/collections"},{key:"assets",label:n()("assets"),icon:"photo_library",link:r()?"/assets":`/assets/${i()?.internalPath??"-/all"}`},...r()?[{key:"menu",label:n()("menu"),icon:"menu",link:"/menu"}]:[]]);var u=nae(),d=F(u);{let f=_(()=>n()("switch_page"));Xm(d,{get"aria-label"(){return c(f)},"aria-controls":"page-container",children:(h,p)=>{var g=X(),m=M(g);rt(m,19,()=>c(l),({key:v,label:b,icon:y,link:w})=>v,(v,b,y)=>{let w=()=>c(b).key,x=()=>c(b).label,E=()=>c(b).icon,$=()=>c(b).link;{const A=C=>{Qe(C,{get name(){return E()}})};let k=_(()=>o()===w()),T=_(()=>c(y)+1);Qf(v,{variant:"ghost",iconic:!0,get selected(){return c(k)},get"aria-label"(){return x()},get keyShortcuts(){return`Alt+${c(T)??""}`},onclick:()=>{Zt($())},startIcon:A,$$slots:{startIcon:!0}})}}),S(h,g)},$$slots:{default:!0}})}S(t,u),se(),s()}var iae=j('<div role="none" class="buttons"><!></div>');function oae(t,e){ae(e,!0);const n=()=>H(d1,"$hasOverlay",i),r=()=>H(ce,"$_",i),[i,o]=ve();W6(t,{get inert(){return n()},children:(a,s)=>{{let l=_(()=>r()("global"));io(a,{variant:"primary",get"aria-label"(){return c(l)},children:(u,d)=>{var f=iae(),h=F(f);sM(h,{}),S(u,f)},$$slots:{default:!0}})}},$$slots:{default:!0}}),se(),o()}var aae=j('<span class="version svelte-wmw2gz"> </span>');const sae={hash:"svelte-wmw2gz",code:".version.svelte-wmw2gz {border-radius:4px;padding:0 6px;color:var(--sui-secondary-foreground-color);background-color:var(--sui-selected-background-color);font-size:var(--sui-font-size-small);}"};function lae(t,e){ae(e,!0),ke(t,sae);const n=()=>H(ce,"$_",i),r=()=>H(ht,"$prefs",i),[i,o]=ve();{const a=l=>{var u=X(),d=M(u);{var f=h=>{var p=aae(),g=F(p);Z(m=>{Se(p,"aria-label",`(${m??""})`),ne(g,`v${Qb}`)},[()=>n()("version_x",{values:{version:Qb}})]),S(h,p)};U(d,h=>{r().devModeEnabled&&h(f)})}S(l,u)};let s=_(()=>n()("release_notes"));vt(t,{get label(){return c(s)},onclick:()=>{window.open("https://github.com/sveltia/sveltia-cms/releases","_blank")},endIcon:a,$$slots:{endIcon:!0}})}se(),o()}var cae=j('<kbd class="svelte-13q15u"> </kbd>'),uae=j("<!> <!>",1),dae=j('<div role="none" class="wrapper svelte-13q15u"><!></div>');const fae={hash:"svelte-13q15u",code:".wrapper.svelte-13q15u {display:contents;}.wrapper.svelte-13q15u .table-row {display:flex;align-items:center;gap:16px;padding:8px 0;border-top:1px solid var(--sui-secondary-border-color);}.wrapper.svelte-13q15u .table-row:last-child {border-bottom:1px solid var(--sui-secondary-border-color);}.wrapper.svelte-13q15u .table-row .feature {flex:auto;}.wrapper.svelte-13q15u .table-row .keys {display:flex;gap:8px;}kbd.svelte-13q15u {display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;border-color:var(--sui-primary-accent-color);border-radius:4px;padding:0 8px;height:32px;min-width:32px;background-color:var(--sui-tertiary-background-color);font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);}"};function hae(t,e){ae(e,!0),ke(t,fae);const n=()=>H(ce,"$_",r),[r,i]=ve();let o=N(e,"open",15,!1),a=N(e,"onClose",3,void 0);const s=[{feature:"view_content_library",keys:"Alt+1"},{feature:"view_asset_library",keys:"Alt+2"},{feature:"search",keys:"Accel+F"},{feature:"create_entry",keys:"Accel+E"},{feature:"save_entry",keys:"Accel+S"},{feature:"cancel_editing",keys:"Escape"}];let l=ie("Ctrl");Vt(()=>{(navigator.userAgentData?.platform==="macOS"||navigator.platform.startsWith("Mac"))&&V(l,"⌘")});{let u=_(()=>n()("keyboard_shortcuts"));xo(t,{get title(){return c(u)},size:"small",showOk:!1,showCancel:!1,showClose:!0,style:"--sui-dialog-small-content-max-height:auto",onClose:()=>{a()?.()},get open(){return o()},set open(d){o(d)},children:(d,f)=>{var h=dae(),p=F(h);{let g=_(()=>n()("keyboard_shortcuts"));DK(p,{get"aria-label"(){return c(g)},children:(m,v)=>{var b=X(),y=M(b);rt(y,17,()=>s,({feature:w,keys:x})=>x,(w,x)=>{let E=()=>c(x).feature,$=()=>c(x).keys;NK(w,{children:(A,k)=>{var T=uae(),C=M(T);cE(C,{class:"feature",children:(O,I)=>{var L=Fe();Z(D=>ne(L,D),[()=>n()(`keyboard_shortcuts_.${E()}`)]),S(O,L)},$$slots:{default:!0}});var P=z(C,2);cE(P,{class:"keys",children:(O,I)=>{var L=X(),D=M(L);rt(D,17,()=>$().split("+"),yr,(B,K)=>{var G=cae(),W=F(G);Z(Y=>ne(W,Y),[()=>c(K).replace("Accel",c(l))]),S(B,G)}),S(O,L)},$$slots:{default:!0}}),S(A,T)},$$slots:{default:!0}})}),S(m,b)},$$slots:{default:!0}})}S(d,h)},$$slots:{default:!0}})}se(),i()}var pae=j("<!> <!>",1);function gae(t,e){ae(e,!0);const n=()=>H(Cd,"$hasMouse",i),r=()=>H(ce,"$_",i),[i,o]=ve();let a=ie(!1);var s=pae(),l=M(s);{var u=f=>{{let h=_(()=>r()("keyboard_shortcuts"));vt(f,{get label(){return c(h)},onclick:()=>{V(a,!0)}})}};U(l,f=>{n()&&f(u)})}var d=z(l,2);hae(d,{onClose:()=>{e.menuButton?.focus()},get open(){return c(a)},set open(f){V(a,f,!0)}}),S(t,s),se(),o()}function uu(t,e){ae(e,!0);const n=()=>H(ht,"$prefs",r),[r,i]=ve();let o=N(e,"defaultValue",3,!0),a=ie(!0);ze(()=>{V(a,!!(n()[e.key]??o()),!0)}),ze(()=>{n()[e.key]!==c(a)&&bt(ht,xe(n)[e.key]=c(a),xe(n))}),w0(t,{get label(){return e.label},get checked(){return c(a)},set checked(s){V(a,s,!0)}}),se(),i()}var mae=j('<section><h4> </h4> <p> </p> <div role="none"><!></div></section>');function vae(t,e){ae(e,!0);const n=()=>H(ce,"$_",r),[r,i]=ve();N(e,"onChange",3,void 0);var o=mae(),a=F(o),s=F(a),l=z(a,2),u=F(l),d=z(l,2),f=F(d);{let h=_(()=>n()("prefs.accessibility.underline_links.switch_label"));uu(f,{key:"underlineLinks",get label(){return c(h)}})}Z((h,p)=>{ne(s,h),ne(u,p)},[()=>n()("prefs.accessibility.underline_links.title"),()=>n()("prefs.accessibility.underline_links.description")]),S(t,o),se(),i()}var _ae=j('<section><h4> </h4> <p> </p> <div role="none"><!></div> <div role="none"><!></div></section>'),bae=j('<section><h4> </h4> <p> </p> <div role="none"><!></div></section> <section><h4> </h4> <p> </p> <div role="none"><!></div></section> <!>',1);function yae(t,e){ae(e,!0);const n=()=>H(ce,"$_",o),r=()=>H(p1,"$skipCIConfigured",o),i=()=>H(ht,"$prefs",o),[o,a]=ve();let s=N(e,"onChange",3,void 0);var l=bae(),u=M(l),d=F(u),f=F(d),h=z(d,2),p=F(h),g=z(h,2),m=F(g);{let T=_(()=>n()("prefs.advanced.beta.switch_label"));uu(m,{key:"beta",get label(){return c(T)},defaultValue:!1})}var v=z(u,2),b=F(v),y=F(b),w=z(b,2),x=F(w),E=z(w,2),$=F(E);{let T=_(()=>n()("prefs.advanced.developer_mode.switch_label"));uu($,{key:"devModeEnabled",get label(){return c(T)},defaultValue:!1})}var A=z(v,2);{var k=T=>{var C=_ae(),P=F(C),O=F(P),I=z(P,2),L=F(I),D=z(I,2),B=F(D);{let W=_(()=>n()("prefs.advanced.deploy_hook.url.field_label"));Yn(B,{flex:!0,get"aria-label"(){return c(W)},showInlineLabel:!0,onchange:()=>{s()?.({message:n()(i().deployHookURL?"prefs.advanced.deploy_hook.url.saved":"prefs.advanced.deploy_hook.url.removed")})},get value(){return i().deployHookURL},set value(Y){bt(ht,xe(i).deployHookURL=Y,xe(i))}})}var K=z(D,2),G=F(K);{let W=_(()=>n()("prefs.advanced.deploy_hook.auth.field_label"));Yn(G,{flex:!0,get"aria-label"(){return c(W)},showInlineLabel:!0,onchange:()=>{s()?.({message:n()(i().deployHookAuthHeader?"prefs.advanced.deploy_hook.auth.saved":"prefs.advanced.deploy_hook.auth.removed")})},get value(){return i().deployHookAuthHeader},set value(Y){bt(ht,xe(i).deployHookAuthHeader=Y,xe(i))}})}Z((W,Y)=>{ne(O,W),ne(L,Y)},[()=>n()("prefs.advanced.deploy_hook.title"),()=>n()("prefs.advanced.deploy_hook.description")]),S(T,C)};U(A,T=>{r()&&T(k)})}Z((T,C,P,O)=>{ne(f,T),ne(p,C),ne(y,P),ne(x,O)},[()=>n()("prefs.advanced.beta.title"),()=>n()("prefs.advanced.beta.description"),()=>n()("prefs.advanced.developer_mode.title"),()=>n()("prefs.advanced.developer_mode.description")]),S(t,l),se(),a()}var wae=j('<section><h4> </h4> <div role="none"><!></div></section>');function xae(t,e){ae(e,!0);const n=()=>H(ce,"$_",i),r=()=>H(ht,"$prefs",i),[i,o]=ve();N(e,"onChange",3,void 0);var a=wae(),s=F(a),l=F(s),u=z(s,2),d=F(u);{let f=_(()=>n()("prefs.appearance.select_theme"));Xm(d,{get"aria-label"(){return c(f)},onChange:h=>{Je(ht,{...r(),theme:h.detail.value})},children:(h,p)=>{var g=X(),m=M(g);rt(m,16,()=>["auto","dark","light"],yr,(v,b)=>{{let y=_(()=>n()(`prefs.theme.${b}`)),w=_(()=>!r().theme&&b==="auto"||r().theme===b);Qf(v,{variant:"tertiary",get label(){return c(y)},get value(){return b},get selected(){return c(w)}})}}),S(h,g)},$$slots:{default:!0}})}Z(f=>ne(l,f),[()=>n()("prefs.appearance.theme")]),S(t,a),se(),o()}var kae=j('<section><h4> </h4> <div role="none"><!></div> <div role="none"><!></div> <div role="none"><!></div></section>');function Sae(t,e){ae(e,!0);const n=()=>H(ce,"$_",r),[r,i]=ve();N(e,"onChange",3,void 0);var o=kae(),a=F(o),s=F(a),l=z(a,2),u=F(l);{let g=_(()=>n()("prefs.contents.editor.use_draft_backup.switch_label"));uu(u,{key:"useDraftBackup",get label(){return c(g)}})}var d=z(l,2),f=F(d);{let g=_(()=>n()("prefs.contents.editor.close_on_save.switch_label"));uu(f,{key:"closeOnSave",get label(){return c(g)}})}var h=z(d,2),p=F(h);{let g=_(()=>n()("prefs.contents.editor.close_with_escape.switch_label"));uu(p,{key:"closeWithEscape",get label(){return c(g)}})}Z(g=>ne(s,g),[()=>n()("prefs.contents.editor.title")]),S(t,o),se(),i()}var Eae=j('<section><h4> </h4> <p><!></p> <div role="none"><!></div></section>'),Tae=j('<section><h4> </h4> <div role="none"><!></div></section> <!>',1);function $ae(t,e){ae(e,!0);const n=()=>H(ce,"$_",i),r=()=>H(ht,"$prefs",i),[i,o]=ve();let a=N(e,"onChange",3,void 0);var s=Tae(),l=M(s),u=F(l),d=F(u),f=z(u,2),h=F(f);oM(h,{});var p=z(l,2);rt(p,17,()=>Object.entries(S1),([g,m])=>g,(g,m)=>{var v=_(()=>ho(c(m),2));let b=()=>c(v)[0],y=()=>c(v)[1];const w=_(()=>{const{serviceLabel:O,apiLabel:I,developerURL:L,apiKeyURL:D}=y();return{serviceLabel:O,apiLabel:I,developerURL:L,apiKeyURL:D}});var x=Eae(),E=F(x),$=F(E),A=z(E,2),k=F(A);_r(k,()=>Qr.sanitize(n()("prefs.i18n.translator.description",{values:{service:c(w).apiLabel,homeHref:`href="${c(w).developerURL}"`,apiKeyHref:`href="${c(w).apiKeyURL}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]}));var T=z(A,2),C=F(T);{var P=O=>{{let I=_(()=>n()("prefs.i18n.translator.field_label",{values:{service:c(w).serviceLabel}}));Zg(O,{flex:!0,autocomplete:"off",spellcheck:"false",get"aria-label"(){return c(I)},onchange:()=>{a()?.({message:n()(r().apiKeys?.[b()]?"prefs.changes.api_key_saved":"prefs.changes.api_key_removed")})},get value(){return r().apiKeys[b()]},set value(L){bt(ht,xe(r).apiKeys[b()]=L,xe(r))}})}};U(C,O=>{r().apiKeys&&O(P)})}Z(()=>ne($,c(w).serviceLabel)),S(g,x)}),Z(g=>ne(d,g),[()=>n()("prefs.i18n.default_translator.title")]),S(t,s),se(),o()}var Aae=j('<section><h4> </h4> <div role="none"><!></div></section>');function Cae(t,e){ae(e,!0);const n=()=>H(ce,"$_",a),r=()=>H(Bt,"$appLocale",a),i=()=>H(ht,"$prefs",a),o=()=>H(z2,"$appLocales",a),[a,s]=ve();N(e,"onChange",3,void 0);var l=Aae(),u=F(l),d=F(u),f=z(u,2),h=F(f);fr(h,r,p=>{{let g=_(()=>n()("prefs.language.ui_language.select_language")),m=_(()=>r()??void 0);bc(p,{get"aria-label"(){return c(g)},get value(){return c(m)},onChange:v=>{Je(ht,{...i(),locale:v.detail.value})},children:(v,b)=>{var y=X(),w=M(y);rt(w,1,o,yr,(x,E)=>{{let $=_(()=>Uo(c(E),{displayLocale:c(E)})??c(E)),A=_(()=>c(E)===r());Mr(x,{get label(){return c($)},get value(){return c(E)},get selected(){return c(A)},dir:"auto"})}}),S(v,y)},$$slots:{default:!0}})}}),Z(p=>ne(d,p),[()=>n()("prefs.language.ui_language.title")]),S(t,l),se(),s()}var Pae=j('<section><h4> </h4> <p><!></p> <div role="none"><!></div></section>'),Oae=j('<section><h4> </h4> <p><!></p> <div role="none"><!></div></section>'),Lae=j("<!> <!>",1),Iae=j('<div role="none"> </div>');function Nae(t,e){ae(e,!0);const n=()=>H(ce,"$_",i),r=()=>H(ht,"$prefs",i),[i,o]=ve();let a=N(e,"onChange",3,void 0);const s=_(()=>{const{providers:m=[]}=zR();return Object.entries(nm).filter(([v])=>m.includes(v))}),l=_(()=>Object.entries(A1).filter(([,{isEnabled:m,authType:v}])=>(m?.()??!0)&&v!=="widget")),u=m=>Qr.sanitize(m,{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]}),d=m=>{a()?.({message:n()(r().apiKeys?.[m]?"prefs.changes.api_key_saved":"prefs.changes.api_key_removed")})};var f=X(),h=M(f);{var p=m=>{var v=X(),b=M(v);{var y=w=>{var x=Lae(),E=M(x);rt(E,17,()=>c(l),([A,k])=>A,(A,k)=>{var T=_(()=>ho(c(k),2));let C=()=>c(T)[0],P=()=>c(T)[1];const O=_(()=>{const{serviceLabel:Y}=P();return{serviceLabel:Y}});var I=Pae(),L=F(I),D=F(L),B=z(L,2),K=F(B);_r(K,()=>u(n()("prefs.media.cloud_storage.description",{values:{service:c(O).serviceLabel}})));var G=z(B,2),W=F(G);{let Y=_(()=>n()("prefs.media.cloud_storage.field_label",{values:{service:c(O).serviceLabel}}));Zg(W,{flex:!0,autocomplete:"off",spellcheck:"false",get"aria-label"(){return c(Y)},onchange:()=>d(C()),get value(){return r().apiKeys[C()]},set value(R){bt(ht,xe(r).apiKeys[C()]=R,xe(r))}})}Z(()=>ne(D,c(O).serviceLabel)),S(A,I)});var $=z(E,2);rt($,17,()=>c(s),([A,k])=>A,(A,k)=>{var T=_(()=>ho(c(k),2));let C=()=>c(T)[0],P=()=>c(T)[1];const O=_(()=>{const{serviceLabel:Y,developerURL:R,apiKeyURL:q}=P();return{serviceLabel:Y,developerURL:R,apiKeyURL:q}});var I=Oae(),L=F(I),D=F(L),B=z(L,2),K=F(B);_r(K,()=>u(n()("prefs.media.stock_photos.description",{values:{service:c(O).serviceLabel,homeHref:`href="${c(O).developerURL}"`,apiKeyHref:`href="${c(O).apiKeyURL}"`}})));var G=z(B,2),W=F(G);{let Y=_(()=>n()("prefs.media.stock_photos.field_label",{values:{service:c(O).serviceLabel}}));Zg(W,{flex:!0,autocomplete:"off",spellcheck:"false",get"aria-label"(){return c(Y)},onchange:()=>d(C()),get value(){return r().apiKeys[C()]},set value(R){bt(ht,xe(r).apiKeys[C()]=R,xe(r))}})}Z(Y=>ne(D,Y),[()=>n()("prefs.media.stock_photos.title",{values:{service:c(O).serviceLabel}})]),S(A,I)}),S(w,x)};U(b,w=>{r().apiKeys&&w(y)})}S(m,v)},g=m=>{cr(m,{children:(v,b)=>{var y=Iae(),w=F(y);Z(x=>ne(w,x),[()=>n()("prefs.media.libraries_disabled")]),S(v,y)},$$slots:{default:!0}})};U(h,m=>{c(s).length||c(l).length?m(p):m(g,!1)})}S(t,f),se(),o()}const im=sn([Pt],([t])=>[{key:"appearance",icon:"palette",component:xae},{key:"language",icon:"language",component:Cae},{key:"contents",icon:"library_books",component:Sae},{key:"i18n",icon:"translate",component:$ae,enabled:(t?.i18n?.locales?.length??0)>1},{key:"media",icon:"photo_library",component:Nae},{key:"accessibility",icon:"accessibility_new",component:vae},{key:"advanced",icon:"build",component:yae}]);var Rae=j('<div role="none" class="wrapper svelte-pwxwga"><!> <!></div>'),Mae=j("<!> <!>",1);const Dae={hash:"svelte-pwxwga",code:".wrapper.svelte-pwxwga {display:flex;}.wrapper.svelte-pwxwga .sui.tab-list {flex:none;}.wrapper.svelte-pwxwga .sui.tab-panel {flex:auto;border-width:0;}.wrapper.svelte-pwxwga .sui.tab-panel section:not(:first-child) {margin:16px 0 0;}.wrapper.svelte-pwxwga .sui.tab-panel p {margin-top:0;}.wrapper.svelte-pwxwga .sui.tab-panel h4 {font-size:inherit;}.wrapper.svelte-pwxwga .sui.tab-panel h4 ~ div {margin:8px 0 0;}.wrapper.svelte-pwxwga .sui.tab-panel h4 ~ p {margin:8px 0 0;color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);}"};function Fae(t,e){ae(e,!0),ke(t,Dae);const n=()=>H(ce,"$_",r),[r,i]=ve();let o=N(e,"open",15,!1),a=N(e,"onClose",3,void 0),s=ie("appearance"),l=ie(""),u=ie(!1);var d=Mae(),f=M(d);{let p=_(()=>n()("settings"));xo(f,{get title(){return c(p)},size:"large",showOk:!1,showCancel:!1,showClose:!0,onClose:()=>{a()?.()},get open(){return o()},set open(g){o(g)},children:(g,m)=>{var v=Rae(),b=F(v);{let w=_(()=>n()("categories"));jK(b,{orientation:"vertical",get"aria-label"(){return c(w)},children:(x,E)=>{var $=X(),A=M($);rt(A,17,()=>oe(im),({key:k,icon:T,enabled:C=!0})=>k,(k,T)=>{let C=()=>c(T).key,P=()=>c(T).icon,O=bw(()=>at(c(T).enabled,!0));var I=X(),L=M(I);{var D=B=>{{const K=Y=>{Qe(Y,{get name(){return P()}})};let G=_(()=>n()(`prefs.${C()}.title`)),W=_(()=>C()===c(s));HK(B,{get label(){return c(G)},get selected(){return c(W)},get"aria-controls"(){return`prefs-tab-${C()??""}`},onSelect:()=>{V(s,C(),!0)},startIcon:K,$$slots:{startIcon:!0}})}};U(L,B=>{c(O)&&B(D)})}S(k,I)}),S(x,$)},$$slots:{default:!0}})}var y=z(b,2);rt(y,17,()=>oe(im),({key:w,component:x})=>w,(w,x)=>{let E=()=>c(x).key,$=()=>c(x).component;qK(w,{get id(){return`prefs-tab-${E()??""}`},children:(A,k)=>{var T=X(),C=M(T);br(C,$,(P,O)=>{O(P,{onChange:({message:I})=>{V(l,I,!0),V(u,!0)}})}),S(A,T)},$$slots:{default:!0}})}),S(g,v)},$$slots:{default:!0}})}var h=z(f,2);nr(h,{get show(){return c(u)},set show(p){V(u,p,!0)},children:(p,g)=>{Hn(p,{status:"success",children:(m,v)=>{var b=Fe();Z(()=>ne(b,c(l))),S(m,b)},$$slots:{default:!0}})},$$slots:{default:!0}}),S(t,d),se(),i()}var zae=j("<!> <!>",1),jae=j("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),Uae=j("<!> <!>",1);function lM(t,e){ae(e,!0);const n=()=>H(mc,"$backendName",u),r=()=>H(ce,"$_",u),i=()=>H(Un,"$user",u),o=()=>H(ht,"$prefs",u),a=()=>H(Cn,"$backend",u),s=()=>H(mn,"$isSmallScreen",u),l=()=>H(aM,"$canShowMobileSignInDialog",u),[u,d]=ve();let f=ie(!1);const h=_(()=>n()==="local"),p=_(()=>n()==="test-repo");var g=Uae(),m=M(g);{let b=_(()=>r()("account"));xr(m,{get"aria-label"(){return c(b)},children:(y,w)=>{var x=jae(),E=M(x);{let W=_(()=>c(h)?r()("working_with_local_repo"):c(p)?r()("working_with_test_repo"):r()("signed_in_as_x",{values:{name:i()?.login}})),Y=_(()=>c(h)||c(p));vt(E,{get label(){return c(W)},get disabled(){return c(Y)},onclick:()=>{window.open(i()?.profileURL,"_blank")}})}var $=z(E,2);vi($,{});var A=z($,2);{let W=_(()=>r()("live_site"));vt(A,{get label(){return c(W)},onclick:()=>{MN()}})}var k=z(A,2);{var T=W=>{var Y=zae(),R=M(Y);{let J=_(()=>r()("git_repository")),Q=_(()=>!a()?.repository?.treeBaseURL);vt(R,{get label(){return c(J)},get disabled(){return c(Q)},onclick:()=>{window.open(a()?.repository?.treeBaseURL)}})}var q=z(R,2);{let J=_(()=>r()("cms_config"));vt(q,{get label(){return c(J)},onclick:()=>{Zt("/config",{transitionType:"forwards"})}})}S(W,Y)};U(k,W=>{o().devModeEnabled&&W(T)})}var C=z(k,2);vi(C,{});var P=z(C,2);{let W=_(()=>r()("settings"));vt(P,{get label(){return c(W)},onclick:()=>{s()?Zt("/settings",{transitionType:"forwards"}):V(f,!0)}})}var O=z(P,2);gae(O,{get menuButton(){return e.menuButton}});var I=z(O,2);{var L=W=>{lae(W,{})};U(I,W=>{o().devModeEnabled&&W(L)})}var D=z(I,2);{var B=W=>{{let Y=_(()=>r()("sign_in_with_mobile"));vt(W,{get label(){return c(Y)},onclick:()=>{Je(rm,!0)}})}};U(D,W=>{l()&&W(B)})}var K=z(D,2);vi(K,{});var G=z(K,2);{let W=_(()=>r()("sign_out"));vt(G,{get label(){return c(W)},onclick:async()=>{window.requestAnimationFrame(()=>{BW()})}})}S(y,x)},$$slots:{default:!0}})}var v=z(m,2);Fae(v,{onClose:()=>{e.menuButton?.focus()},get open(){return c(f)},set open(b){V(f,b,!0)}}),S(t,g),se(),d()}var Bae=j('<img class="avatar svelte-q0ng4j" loading="lazy" alt=""/>'),qae=j('<div role="none" class="wrapper svelte-q0ng4j"><!></div>');const Hae={hash:"svelte-q0ng4j",code:".wrapper.svelte-q0ng4j {display:contents;}.wrapper.svelte-q0ng4j button.avatar {border-width:0;background-color:transparent;}.avatar.svelte-q0ng4j {width:32px;height:32px;border-radius:32px;object-fit:cover;}"};function Kae(t,e){ae(e,!0),ke(t,Hae);const n=()=>H(mc,"$backendName",o),r=()=>H(Un,"$user",o),i=()=>H(ce,"$_",o),[o,a]=ve();let s=ie(void 0);const l=_(()=>n()==="local"),u=_(()=>!!r()?.avatarURL);var d=qae(),f=F(d);{const h=y=>{var w=X(),x=M(w);{var E=A=>{Qe(A,{name:"arrow_drop_down",class:"small-arrow"})},$=A=>{var k=X(),T=M(k);{var C=O=>{var I=Bae();Z(()=>Se(I,"src",r()?.avatarURL)),S(O,I)},P=O=>{Qe(O,{name:"account_circle"})};U(T,O=>{c(u)?O(C):O(P,!1)},!0)}S(A,k)};U(x,A=>{c(l)?A(E):A($,!1)})}S(y,w)},p=y=>{lM(y,{get menuButton(){return c(s)}})};let g=_(()=>!c(l)),m=_(()=>c(l)?i()("local_backend.indicator"):void 0),v=_(()=>c(u)?"avatar":""),b=_(()=>i()("show_account_menu"));St(ei(f,{variant:"ghost",get iconic(){return c(g)},get label(){return c(m)},get class(){return c(v)},popupPosition:"bottom-right",get"aria-label"(){return c(b)},endIcon:h,popup:p,$$slots:{endIcon:!0,popup:!0}}),y=>V(s,y,!0),()=>c(s))}S(t,d),se(),a()}var Vae=j("<!> <!>",1),Gae=j("<!> <!>",1);function Wae(t,e){ae(e,!0);const n=()=>H(ce,"$_",r),[r,i]=ve(),o=_(()=>Qs({visible:!0,type:"entry"}));{const a=u=>{Qe(u,{name:"add"})},s=u=>{{let d=_(()=>n()("create_entry_or_assets"));xr(u,{get"aria-label"(){return c(d)},children:(f,h)=>{var p=Gae(),g=M(p);{var m=b=>{var y=Vae(),w=M(y);rt(w,17,()=>c(o),E=>E.name,(E,$)=>{const A=_(()=>{const{name:k,label:T,label_singular:C,create:P=!0,limit:O=1/0}=c($);return{name:k,label:T,labelSingular:C,create:P,limit:O}});{let k=_(()=>c(A).labelSingular||c(A).label||c(A).name),T=_(()=>!c(A).create||Sa(c(A).name).length>=c(A).limit);vt(E,{get label(){return c(k)},get disabled(){return c(T)},onclick:()=>{Zt(`/collections/${c(A).name}/new`,{transitionType:"forwards"})}})}});var x=z(w,2);vi(x,{}),S(b,y)};U(g,b=>{c(o).length&&b(m)})}var v=z(g,2);{let b=_(()=>n()("assets"));vt(v,{get label(){return c(b)},onclick:async()=>{Zt("/assets",{transitionType:"forwards"}),await Rt(100),Je(vs,!0)}})}S(f,p)},$$slots:{default:!0}})}};let l=_(()=>n()("create_entry_or_assets"));ei(t,{variant:"ghost",iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return c(l)},endIcon:a,popup:s,$$slots:{endIcon:!0,popup:!0}})}se(),i()}function Yae(t,e){ae(e,!0);const n=()=>H(ce,"$_",r),[r,i]=ve();{const o=s=>{Qe(s,{name:"notifications"})};let a=_(()=>n()("show_notifications"));et(t,{variant:"ghost",iconic:!0,hidden:!0,get"aria-label"(){return c(a)},onclick:()=>{},startIcon:o,$$slots:{startIcon:!0}})}se(),i()}var Jae=j('<img loading="lazy" alt="" class="logo svelte-15c9hhi"/>');const Xae={hash:"svelte-15c9hhi",code:"img.svelte-15c9hhi {width:24px;height:24px;object-fit:contain;}"};function Zae(t,e){ae(e,!0),ke(t,Xae);const n=()=>H(Pt,"$cmsConfig",i),r=()=>H(ce,"$_",i),[i,o]=ve(),a=_(()=>n()?.logo?.src??n()?.logo_url),s=_(()=>n()?.logo?.show_in_header??!0);var l=X(),u=M(l);{var d=f=>{{let h=_(()=>r()("visit_live_site"));et(f,{variant:"ghost",iconic:!0,get"aria-label"(){return c(h)},onclick:()=>{MN()},children:(p,g)=>{var m=Jae();Z(()=>Se(m,"src",c(a))),S(p,m)},$$slots:{default:!0}})}};U(u,f=>{c(a)&&c(s)&&f(d)})}S(t,l),se(),o()}var Qae=j('<div role="none" class="buttons"><!> <!></div> <!> <div role="none" class="buttons"><!> <!> <!> <!> <!></div>',1),ese=j('<div role="none" class="toolbar-wrapper svelte-1kz79fh"><!></div>');const tse={hash:"svelte-1kz79fh",code:`.toolbar-wrapper.svelte-1kz79fh {display:contents;}.toolbar-wrapper[inert].svelte-1kz79fh {display:none;}
|
|
697
696
|
@media (width < 768px) {.toolbar-wrapper.svelte-1kz79fh > .sui.toolbar {padding:0 4px;}
|
|
698
697
|
}.toolbar-wrapper.svelte-1kz79fh > .sui.toolbar .buttons {flex:auto;display:flex;align-items:center;width:50%;}.toolbar-wrapper.svelte-1kz79fh > .sui.toolbar .buttons:last-child {justify-content:flex-end;}.toolbar-wrapper.svelte-1kz79fh > .sui.toolbar .sui.search-bar {flex:none;width:640px;max-width:50%;}
|
|
699
698
|
@media (width < 768px) {.toolbar-wrapper.svelte-1kz79fh > .sui.toolbar .sui.search-bar {flex:auto;width:-moz-available;width:-webkit-fill-available;width:stretch;max-width:none;}
|